feat: harden sshd on server

This commit is contained in:
wi11-holdsworth 2025-10-22 17:28:44 +11:00
parent 2652248bc3
commit 77225f2fa1

View file

@ -25,7 +25,19 @@
networking.hostName = "${hostName}"; networking.hostName = "${hostName}";
services.openssh.enable = true; # hardened openssh
services.openssh = {
passwordAuthentication = false;
allowSFTP = false;
challengeResponseAuthentication = false;
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
system.stateVersion = "24.11"; system.stateVersion = "24.11";