Files
conf/modules/nixos/networking/hard-ssh.nix
2026-04-03 21:26:04 +02:00

19 lines
349 B
Nix

{
services.openssh = {
enable = true;
allowSFTP = false;
ports = [5522];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = true;
};
extraConfig = ''
AllowTcpForwarding no
AllowAgentForwarding no
MaxAuthTries 3
MaxSessions 4
TCPKeepAlive no
'';
};
}