Configure fail2ban on debian 13

As root user install:

aptitude install fail2ban python3-systemd

Edit jail.local:

nano /etc/fail2ban/jail.local

Add the following configuration in the sshd section:

[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = systemd

Finally:

systemctl start fail2ban