[olug] Detecting Remote Shell

William E. Kempf wekempf at cox.net
Wed Mar 5 10:49:09 UTC 2003


Is there an easy, universal, way to detect if a shell is running locally
or remotely? For SSH specifically I can always use the SSH_TTY for ssh,
but what about RSH, Telnet or other remote shell options? I want to have
the .bashrc script do different things depending on whether it's running
on the local machine or from a remote machine.

-- 
William E. Kempf





More information about the OLUG mailing list