This will limit incoming connections to port 22 to no more than 4 attemps in ten minutes. Any more will be dropped.
You can adjust the numbers yourself to limit connections further.
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 --hitcount 4 -j DROP