This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: A Second OpenSSH Path Question
- From: Bjoern Kahl AG Resy <kahl at informatik dot uni-kl dot de>
- To: Karl M <karlm30 at hotmail dot com>
- Cc: cygwin at cygwin dot com
- Date: Tue, 18 Dec 2001 08:41:18 +0100 (MET)
- Subject: Re: A Second OpenSSH Path Question
Hallo!
On Mon, 17 Dec 2001, Karl M wrote:
> I have a vanilla install on a Win2k, SP2 machine.
> If I type
>
> ssh localhost which find
>
> I get the one in /c/WINNT/System32
> If I type
>
> ssh localhost
>
> and then type
> which find in the new session, I get the one in /usr/bin
> So again, why do the two methods produce different results?
Because your first example do not run a login-shell and therefor
do not run login-scripts ?
sshd executes the given command without first starting a shell.
(try "ssh localhost ps -el" and look for the parent process of ps)
(If you run a script via ssh, then that script will be executet
by a shell given in the first line of the script. But such a shell
will never execute profile or any other loginscript (reading these
files would break the original script).)
"man sshd" suggested to try the $HOME/.ssh/sshrc or .../environment
file to setup ssh-environment.
Bjoern
--
+---------------------------------------------------------------------+
| Dipl.-Phys. Bjoern Kahl +++ AG Embedded Systems and Robotics (RESY) |
| Informatics Faculty +++ Building 48 +++ University of Kaiserslautern|
| phone: +49-631-205-2654 +++ www: http://resy.informatik.uni-kl.de |
+---------------------------------------------------------------------+
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/