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