Friday, July 2, 2021

Getting logs related to a specific user login in Ubuntu 20.04

I was having some trouble on Ubuntu 20.04 with figuring out why a Active Directory user couldn't log in to the server via SSH, and eventually came up with this, which was inspired by the link below it.

sudo journalctl | grep <<username>>

From here:

All messages about sshd:

journalctl -t sshd


journalctl -u ssh 

Messages about sshd from the last boot:

journalctl -t sshd -b0

Messages about sshd from the last boot in the reverse order:

journalctl -t sshd -b0 -r