auth.log

The Linux log file that records logins, SSH sessions, sudo use and other authentication events.

In more detail

On Debian and Ubuntu it is /var/log/auth.log; on Red Hat systems it is /var/log/secure. The SSH daemon writes lines such as "Failed password for jsmith from 198.51.100.23". Its classic syslog timestamps carry no year and no time zone, so convert them carefully.

Examples

Sep 27 09:13:05 web01 sshd[4133]: Accepted publickey for alice from 203.0.113.7 port 51022 ssh2
Sep 27 09:15:10 web01 sudo:      bob : user NOT in sudoers ; TTY=pts/1 ; PWD=/home/bob ; USER=root ; COMMAND=/usr/bin/cat /etc/shadow

Related terms

Taught in

References