I added the following firewall rules in order to defend against ssh attacks.
iptables -N LOGNDROP
iptables -A LOGNDROP -j LOG --log-prefix "SSH attack! " --log-level 7
iptables -A LOGNDROP -j DROP
iptables -A INPUT -i eth0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i eth0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 3600 --hitcount 4 -j LOGNDROP
Is it possible to reset that counter after a successful login attempt? Altough this solution works fine, I'm restricted to 3 successful login per hour too!