SSH_CLIENT _not_ set when doing a command

Damien Miller djm at mindrot.org
Tue Sep 26 12:14:26 EST 2000


On Sun, 24 Sep 2000, Sendy wrote:


> In an interactive shell, the env variable 'SSH_CLIENT' is set, and
> this variable can easily be parsed for the connecting ipnumber. The
> real problem is that this variable is _not_ set when just executing a
> remote command.
 
Are you sure this doesn't happen?

[damien at neon openssh]$ ssh localhost 'env|grep SSH_CLIENT'
SSH_CLIENT=127.0.0.1 728 22

-d

-- 
| ``The power of accurate observation is  | Damien Miller <djm at mindrot.org>
| commonly called cynicism by those who   | @Work <djm at ibs.com.au>
| have not got it'' - George Bernard Shaw | http://www.mindrot.org






More information about the openssh-unix-dev mailing list