Are you still banning, or do you already penalize?

Still using fail2ban just for stopping SSH brute force attempts? Since OpenSSH 9.8 there is a new config option for sshd_config: PerSourcePenalties This option has several parameters where you can define how long a client, based on its IP address, will be blocked, according to the unwanted behaviour. The most important parameters are:

There is also PerSourcePenaltyExemptList, which is a comma-separated list of addresses to exempt from penalties.

As you can see the default values are quite lax. Let's tighten the rules a bit:

The resulting sshd_config snippet looks like this (for OpenSSH 10.3 and newer)

MaxAuthTries 3
PerSourcePenalties crash:3600s invaliduser:300s authfail:3600s max:86400s

Since OpenSSH 10.3 is quite new (released on 2026-04-02), most Linux users would want to omit the invaliduser parameter:

MaxAuthTries 3
PerSourcePenalties crash:3600s authfail:3600s max:86400s

This makes tools like fail2ban quite obsolete, if it is used in an default setup just for blocking SSH brute force attempts. Of course, if you're using them in more complex scenarios and not only for SSH, these tools are still useful.