SSH_CLIENT _not_ set when doing a command
Sendy
sgr at rotzorg.org
Sun Sep 24 23:47:36 EST 2000
Hi,
I'm trying to create an dynamic dns system by using the nsupdate (or Net::DNS) trough a non-passphrase protected ssh session. I've keygen'ed an extra key, with no passphrase and using it, i execute a litte script on the server, which updates te DNS records. (something like this: ssh pickup /usr/local/bin/updatedns 10.1.2.3)
This al works fine and dandy. I would like to protect this scheme more by using the command="<command>" feature, the only problem is that i can't use an ip-number in authorized_keys (because i do not know it).
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.
Is it possible to retrieve the ipnumber of the connecting client while executing a remote command? Simply turning on the enviroment variables should suffice.
im using OpenSSH version 2.2.0p1 on Debian GNU.
gr,
Sendy De Graaf
sendy at dds.nl
More information about the openssh-unix-dev
mailing list