{ services.openssh = { enable = true; allowSFTP = true; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; PermitRootLogin = "prohibit-password"; # Allow root login with SSH keys only }; }; networking.firewall = { allowedTCPPorts = [ 22 ]; }; }