check last success login attempts ubuntu

grep "session opened" /var/log/auth.log
cat /var/log/auth.log | grep "session opened"

In order to display extra information about the failed SSH logins, issue the command as shown in the below example.

 egrep "session opened|successful" /var/log/auth.log


Leave a Reply