0

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

morad della3
  • 51
  • 2
  • 5

1 Answers1

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