LLI Wiki — My Digital Knowledge Base

Linux: follow failed SSH logins in the logs

journalctl and tail commands to watch errors and failed SSH passwords live.

To troubleshoot failed SSH logins on Linux, follow the system logs and the authentication log live, filtering on errors.

# Errors and failures since boot, live (journald)
journalctl -b -f | grep -i -E 'error|failed'

# Failed passwords in the authentication log, live
sudo tail -f /var/log/auth.log | grep -i "Failed password"

How it works

Notes

Mastodon LLIMastodon SocialFosstodon