Reading auth.log in five minutes
The four fields that matter in every SSH line, and the one command that finds password guessing.
1 min read
Every SSH login, failed or not, leaves one line in /var/log/auth.log. Four fields in that line answer
most questions an analyst asks first.
The four fields
- Time: when it happened, in the server's clock.
- Host: which machine wrote it.
- Process:
sshd[1234], the daemon and its process id. - Message: what happened.
Finding failed logins
grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -rn | head
The count per source address shows at a glance whether one host is guessing passwords.
What to check next
A burst of failures followed by one success from the same address deserves a closer look.
Updated 5 November 2026
Keep reading
Web security
SQL injection, explained with one query
Why concatenating input into SQL breaks, and why parameters fix it for good.
1 min read
