Method 1: Using Lastb Command
lastb | head -20Method 2: Count Failed Attempts
sudo grep "Failed password" /var/log/auth.log | wc -lMethod 3: Show Failed Attempts by IP
sudo grep "Failed password" /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -nrMethod 4: Real-Time Monitoring
sudo tail -f /var/log/auth.log | grep "Failed password"