snowflake/modules/openssh.nix

20 lines
449 B
Nix
Raw Normal View History

2023-05-01 03:33:33 -04:00
{lib, ...}: {
2023-04-26 19:23:23 -04:00
services.openssh = {
enable = true;
settings = {
2023-04-26 21:21:46 -04:00
KbdInteractiveAuthentication = false;
2023-05-01 03:33:33 -04:00
PasswordAuthentication = lib.mkForce false;
2023-04-26 19:26:28 -04:00
PubkeyAuthentication = true;
2023-05-01 03:33:33 -04:00
PermitRootLogin = lib.mkForce "no";
2023-04-26 19:23:23 -04:00
StreamLocalBindUnlink = "yes";
GatewayPorts = "clientspecified";
};
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
}