Skip to content

Instantly share code, notes, and snippets.

@colinwilson
Created July 6, 2015 15:02
Show Gist options
  • Save colinwilson/acc0a26ead3da36e07bc to your computer and use it in GitHub Desktop.
Save colinwilson/acc0a26ead3da36e07bc to your computer and use it in GitHub Desktop.
Debian - See all failed/successful SSH login attempts
#As root or via sudo, type this to see all failed login attempts
cat /var/log/auth.log | grep 'sshd.*Invalid'
#If you want to see successful logins, type this
cat /var/log/auth.log | grep 'sshd.*opened'
#View all failed login attempts in real-time
tail -f /var/log/auth.log | grep 'sshd.*Invalid'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment