nix-config/features/shared/ssh.nix

22 lines
371 B
Nix
Raw Normal View History

2024-08-16 16:42:55 +02:00
{ config, ... }:
{
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
2024-12-27 14:34:19 +01:00
services.fail2ban.jails.sshd.settings = {
ssh = ''
enabled = true
port = ssh
filter = sshd
logpath = %(sshd_log)s
maxretry = 5
'';
};
2024-08-16 16:42:55 +02:00
}