Getting client IP address from shell

From: Hutcheson, Mike (Mike_Hutcheson@baylor.edu)
Date: Fri Jan 31 2003 - 12:26:10 EST


Hi. I've been racking my brains on this (rattle rattle) and I'm almost embarrassed to ask since there's probably an obvious answer. On a Tru64 Unix 5.1A cluster with enhanced security enabled, I have an account that is "captive." In other words, the user is taken into a menu and doesn't get to the command line. The shell is the Borne shell.

While in .profile, I would like to get the host name or IP address of the client that is either telnetting or ssh'ing into the account. I'm running OpenSSH and Tru64's telnet. I'm using TCPwrappers with telnet. OpenSSH creates an environment variable called SSH_CLIENT which I could use but I still haven't figured out how to address the situation if someone telnets into the account.

Any suggestions?

Thanks for your help,

Mike Hutcheson (Mike_Hutcheson@baylor.edu)
Systems Manager (254) 710-4110
Baylor University - Information Technology Services



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:06 EDT