diff --git a/features/shared/ssh.nix b/features/shared/ssh.nix index ed78121..4400ec3 100644 --- a/features/shared/ssh.nix +++ b/features/shared/ssh.nix @@ -8,4 +8,14 @@ PermitRootLogin = "no"; }; }; + + services.fail2ban.jails.sshd.settings = { + ssh = '' + enabled = true + port = ssh + filter = sshd + logpath = %(sshd_log)s + maxretry = 5 + ''; + }; }