General discussion

Locked

Find IP address a user is logged in from

By cp409sd ·
I am running Red Hat 6.1. I am writing a short script. When this script is run, I would like to know where, as is what IP address, that the user who is logged in and running this script is at. I log in remotely to this machine using an ssh connection. I am not quite sure what commands will give me the info I am looking for. Any help is appreciated.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Find IP address a user is logged in from

by Skizz In reply to Find IP address a user is ...

You can use w or finger to get details of ip address, cut/awk the required fields. You may also need to use tty to find the line corresponding to the details you require, especially if there are multiple logons

Collapse -

Find IP address a user is logged in from

by cp409sd In reply to Find IP address a user is ...

Thanks for the help. Exexctly what I needed to know.

Collapse -

Find IP address a user is logged in from

by cp409sd In reply to Find IP address a user is ...

This question was closed by the author

Back to Linux Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums