Read the auth log, ban the offenders
Fail2ban watches log files for failed-login signatures and automatically blocks offending IPs at the firewall layer. After N failed attempts within M minutes, the IP gets a temporary ban. Even with key-only auth (which makes brute-force pointless), fail2ban cuts the noise in your auth logs and reduces the surface for slow-burn attacks.
The basic SSH jail
Fail2ban ships with a battle-tested SSH jail. You usually only override the threshold and ban duration in jail.local (never jail.conf — that gets overwritten by package upgrades). Set maxretry, findtime, bantime, and ignoreip for your LAN.