In association with heise online

Or using IPTables 01 September 2010 18:08

iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m
recent --set --name SSH
iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m
recent --update --seconds 60 --hitcount 8 --rttl --name SSH -j DROP

These rules will automatically add drop rules for IP addresses that
attempt to login more than 8 times in 60 seconds.

The H open source

The H Security

The H Internet Toolkit