Where is my user connecting from

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,

I tried this in c.u.shell, but figured you people might have a brighter

I have a user connecting from some IP address via SSH.

This user does not have root access.

This user is connecting in "batch" mode, i.e. submitting a command and
then disconnecting (apologies if "batch" mode is not the convential
term; I welcome education).

Is there a way that I can determine what that user's IP address is,
when they connect?

I thought a combination of "who -m", "sed", "host" and "cut" would
help, but "who -m" returns nothing in "batch" mode.
Someone suggested "netstat -ntp", but this doesn't offer a way to tie
the current SSH connection to a specific IP address.

Any suggestions?


Dan Rumney

Site Timeline