A Second OpenSSH Path Question

Bjoern Kahl AG Resy kahl@informatik.uni-kl.de
Tue Dec 18 00:16:00 GMT 2001


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.


| 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/

More information about the Cygwin mailing list