cornflake/programs/ssh.nix
2026-03-01 01:39:57 +09:00

27 lines
511 B
Nix

{
programs.ssh.startAgent = true;
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";
}
];
};
}