Skip to content

Instantly share code, notes, and snippets.

@lennart
Created January 2, 2010 20:39
Show Gist options
  • Save lennart/267660 to your computer and use it in GitHub Desktop.
Save lennart/267660 to your computer and use it in GitHub Desktop.
Who am I connected to over SSH? (Admin: Who is connected to me?)
lsof | sed -n "s/^\(sshd*\).*TCP \(\(.*\):[0-9][0-9]*\) (ESTABLISHED)$/\U\1:\L \2/p"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment