Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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