From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4537 invoked by alias); 6 May 2004 01:57:59 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 4197 invoked from network); 6 May 2004 01:57:57 -0000 Received: from unknown (HELO ellimark.vpscenter.com) (206.62.135.18) by sources.redhat.com with SMTP; 6 May 2004 01:57:57 -0000 Received: from pobox.com ([159.87.128.56]) by ellimark.vpscenter.com (8.11.6/8.11.6) with ESMTP id i461v8G20329 for ; Wed, 5 May 2004 18:57:09 -0700 Message-ID: <40999B63.8080305@pobox.com> Date: Thu, 06 May 2004 01:57:00 -0000 From: Tim Shadel User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: sshd, plink, bash and path problems Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-05/txt/msg00203.txt.bz2 I'm not subscribed to the list. Kindly CC: me in any threads that result from this email. Thanks. Here's my setup: Client: Win2K box with Putty/Plink Server: Win2K professional with cygwin/sshd (actually copssh, but it's just a minimal cygwin install) I can login just fine. I can use public key authentication fine. Here's what I'd like to do: plink -batch -2 -i C:\path\to\my\key\mykey.PPK -l tims 159.87.127.66 mkdir -p /var/some/dir/that/does/not/exist Nothing happens. Here's something else I tried to see what's going on: plink -batch -2 -i C:\path\to\my\key\mykey.PPK -l tims 159.87.127.66 echo $PATH /cygdrive/c/j2sdk... Basically my entire Windows path prints out -- NOT my cygwin path. I saw another post on this in a different context (http://www.cygwin.com/ml/cygwin/2003-07/msg01700.html), and I can see that it's a matter of commands getting executed when the login process happens. So then I tried this: plink -batch -2 -i C:\path\to\my\key\mykey.PPK -l tims 159.87.127.66 source /etc/profile; echo $PATH /bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT And got the output I expected. BUT, the plink command is being issued by a program that I can't modify (apache's maven deploy plugin), so I wondered two things: 1. What's different between plink and plink (which displays a prompt) that causes the magical "login" process to occur. Is this a plink thing? a bash thing? a cygwin-version-of-either thing? 2. Is there a file (.rc something-or-other perhaps?) that I can create that will make the "source /etc/profile" call once plink connects, so I can have the right path when happens? Any help with this would be most appreciated. Thanks, Tim Shadel -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/