count ssh failed login
grep “Failed password for invalid user” /var/log/secure | awk ‘{print substr($13,8)}’ | awk ‘{count[$1]++} END { for( i in count ) { if ( count[i] >= 3 ){print i ” Total Failed Attempts: ” count[i] “”} }}’
grep “Failed password for invalid user” /var/log/secure | awk ‘{print substr($13,8)}’ | awk ‘{count[$1]++} END { for( i in count ) { if ( count[i] >= 3 ){print i ” Total Failed Attempts: ” count[i] “”} }}’