SSH_CLIENT _not_ set when doing a command

Sendy sgr at rotzorg.org
Tue Sep 26 19:33:24 EST 2000


Well, fairly certain i think....

If i do this on a Debian GNU system with
$ sshd -?
SSH Version 1.2.26 [i586-unknown-linux]
<CUT>
(a Debian 2.1 system) i do get the SSH_CLIENT string back:
$ ssh localhost 'env|grep SSH_CLIENT'
SSH_CLIENT=127.0.0.1 1023 22
$ 

If i run 'env|grep SSH_CLIENT' on a Debian 2.2 system with
sgr at PCB25:~$ sshd -?
SSH Version OpenSSH-1.2.3
<CUT>
i do not get the string back:
sgr at PCB25:~$ ssh localhost 'env|grep SSH_CLIENT'
sgr at PCB25:~$

And if i run this on another Debian 2.2 system with ssh upgraded to
sgr at pickup:~$ sshd -?
SSH Version OpenSSH_2.2.0p1
<CUT>
i also not get the envvar back:
sgr at pickup:~$ ssh localhost 'env|grep SSH_CLIENT'
sgr at pickup:~$ 

I've tried to build the source myself, but can't get the openssl libs properly installed... i have given up on this. Maybe its related to the debian patch from
http://non-us.debian.org/debian-non-US/dists/unstable/non-US/main/source/openssh_2.2.0p1-1.diff.gz or the some config option?

TIA
Sendy
sendy at dds.nl


On Tue, Sep 26, 2000 at 12:14:26PM +1100, Damien Miller wrote:
> 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