reciproka-ops/profiles/openssh.nix

22 lines
424 B
Nix
Raw Normal View History

2021-10-07 02:13:48 +00:00
# SSH service configuration common to all hosts
{
config,
pkgs,
lib,
...
}: {
2021-10-07 02:13:48 +00:00
services.openssh = {
enable = true; # Enable the OpenSSH daemon.
2021-10-07 02:13:48 +00:00
permitRootLogin = "prohibit-password";
kbdInteractiveAuthentication = false;
2021-10-07 02:13:48 +00:00
passwordAuthentication = false;
openFirewall = true;
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
}