monitor putty ssh connections

106 views
Skip to first unread message

loial

unread,
Jan 16, 2013, 4:25:03 AM1/16/13
to linuxus...@googlegroups.com
Is there anyway to tell where a putty ssh connection has originated from...i.e the machine from which putty has been used to connect to the server?

Jeremiah Bess

unread,
Jan 16, 2013, 4:25:51 AM1/16/13
to LUG
Use the 'w' or 'who' command. It shows who is connected.


Jeremiah E. Bess
Network Ninja, Penguin Geek, Father of five.

 


On Wed, Jan 16, 2013 at 1:55 PM, loial <jldun...@gmail.com> wrote:
Is there anyway to tell where a putty ssh connection has originated from...i.e the machine from which putty has been used to connect to the server?

--
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to linuxus...@googlegroups.com
To unsubscribe, send email to linuxusersgro...@googlegroups.com
For more options, visit our group at http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules or http://cdn.fsdev.net/List-Rules.pdf)

Message has been deleted

Collins Oluoch

unread,
Jan 16, 2013, 5:43:19 AM1/16/13
to linuxus...@googlegroups.com
"w" should sort you out.
Incase you are sure they are on ssh, as root you can also use netstat as below.
]# netstat -anp | grep ssh | grep ESTAB

You can get even the port they are connected from and pid. 

Regards,
Collins
-- 
In a world without walls and fences, who needs Windows and Gates

bryans...@gmail.com

unread,
Jan 20, 2013, 11:28:19 PM1/20/13
to linuxus...@googlegroups.com
Hey,

The 'who' and or the 'w' command only display sessions currently taking place. Another way to do this is to use the last command, which will display past logins as well. This way you can actually see who logged in when you're not monitoring live.

This will show all logins plus the hostname: last -a

This will show all logins plus the ipaddress: last -i

Read the man page to find out more.

Bryan
Reply all
Reply to author
Forward
0 new messages