Files
NixOsConfig/modules/nixos/security/ssh.nix
T
2026-10-12 18:15:38 +03:00

22 lines
491 B
Nix
Executable File

# Key-only OpenSSH server. The host key is also the agenix identity.
{
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
hostKeys = [
{
type = "ed25519";
path = "/etc/ssh/ssh_host_ed25519_key";
}
];
};
# The keyring (NixOS) and home-manager provide the agent.
programs.ssh.startAgent = false;
}