cornflake/programs/ssh.nix
2025-01-30 21:55:28 +09:00

25 lines
476 B
Nix

{
services.openssh = {
enable = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = false;
AllowUsers = [ "hare" ];
UseDns = true;
X11Forwarding = false;
PermitRootLogin = "prohibit-password";
};
hostKeys = [
{
bits = 4096;
path = "/etc/ssh/ssh_host_rsa_key";
type = "rsa";
}
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
}