Skip to content

Instantly share code, notes, and snippets.

@rupakraj
Created February 26, 2016 09:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupakraj/ece2503ecc0b57baa6b0 to your computer and use it in GitHub Desktop.
Save rupakraj/ece2503ecc0b57baa6b0 to your computer and use it in GitHub Desktop.
Handy Shell Commands for checking SSH Access using last, lastb, sed
# lastb : Unsuccessful attempts
# last : Successful attempts
sudo lastb | sed 's/ \+/ /g'| cut -d' ' -f3 | sort | uniq -c | sort -n
sudo last | sed 's/ \+/ /g'| cut -d' ' -f3 | sort | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment