[ale] IP of host?

Jacob Langseth jwl at pobox.com
Sat Nov 6 11:02:15 EST 1999


Jim Popovitch scribed:
> Is there a cmd line util (or perl cmd) that will tell me the IP of the
> host I logged in (ssh/rsh/telnet/etc) from?  Something like REMOTE_ADDR
> does for CGI. I know finger will tell me everyone who is logged in, but
> what I really want/need is just the remote IP of the current session.

Login with each method and type
    env | more
You should see some variables which contain
either an ip address or the hostname of your
remote end.

For ssh, SSH_CLIENT is set.
For telnet, REMOTEHOST is set.

Hope this helps,

-- 
Jacob Langseth <jwl at pobox.com>






More information about the Ale mailing list