I want to monitor SSH sessions, including login and logout events. When I run journalctl
without any flags, I see both login events like:
Accepted publickey for root from 192.168.1.24 port 56464
and logout events like:
Disconnected from user root 192.168.1.24 port 56464
But when I want to reduce the output and filter only the sshd
events I run journalctl -u sshd
. In this case I see only the Accepted publickey
events, but not the Disconnected from user
events.