What's the file in which the SSH logs are located in ubuntu server 22.04? FOR exp in centos "/var/log/secure"
Asked
Active
Viewed 2,663 times
0
-
/var/log/auth.log ? – Esther Sep 21 '22 at 21:09
-
Does this answer your question? Where does Ubuntu 14.04 log SSH access attempts? – Esther Sep 21 '22 at 21:12
-
4Does this answer your question? How do I keep track of failed SSH log-in attempts? – Dan Sep 21 '22 at 21:14
1 Answers
1
If you are looking for logs that show SSH connections, they are in
/var/log/auth.log
example:
Sep 20 17:39:52 [hostname] sshd[257027]: Accepted publickey for [username] from [ipaddress] port 57504 ssh2: RSA [alphanumeric-string]
Sep 20 17:39:52 [hostname] sshd[257027]: pam_unix(sshd:session): session opened for user [username] by (uid=0)
Sep 20 17:39:52 [hostname] sshd[257250]: Received disconnect from [ipaddress] port 57504:11: disconnected by user
Sep 20 17:39:52 [hostname] sshd[257250]: Disconnected from user [username] [ipaddress] port 57504
Sep 20 17:39:52 [hostname] sshd[257027]: pam_unix(sshd:session): session closed for user [username]

Organic Marble
- 23,641
- 15
- 70
- 122