0

What's the file in which the SSH logs are located in ubuntu server 22.04? FOR exp in centos "/var/log/secure"

3

1 Answer 1

0

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]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.