fail2ban

 fail2ban  is a utility that bans logins from IP addresses that show signs of malicious activity (like many failed login attempts).

Because the marking as banned is automatic, you should always ensure that your IP address is part of the whitelist - see http://www.fail2ban.org/wiki/index.php/Whitelist