nixos-config/.modules/services/openssh.nix
2023-02-01 03:11:48 -05:00

17 lines
No EOL
444 B
Nix

_: { config, pkgs, lib, ... }:
{
services.openssh = {
enable = true;
openFirewall = true;
startWhenNeeded = true;
kexAlgorithms = [ "curve25519-sha256@libssh.org" ];
passwordAuthentication = false;
kbdInteractiveAuthentication = false;
permitRootLogin = "no";
};
security.pam = mkDefault{
enableSSHAgentAuth = true;
services.sudo.sshAgentAuth = true;
};
}