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 4,190 times
1 Answers
2
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
- 24,696