PDA

View Full Version : [ubuntu] [SOLVED] Check current connections/sessions?



jimv
June 23rd, 2008, 08:40 PM
I'm curious as to how I could check to see what connections are currently open on my machine. In particular, I'd like to be able to see who is connected via SSH and what their IP address is.

Zulu-Zeffir
June 23rd, 2008, 08:52 PM
netstat -tunva
and better yet you can pipe the command to grep for specific services.
If you know that SSH runs on port 22 then:
netstat -tunva | grep 22
or
if you know what ip address your looking for
netstat -tunva | grep 192.168.1.1