Added kylekrein-mac openssh

This commit is contained in:
Aleksandr Lebedev 2025-01-12 16:58:59 +01:00
parent 0421fb57b3
commit 46a145f179
5 changed files with 74 additions and 38 deletions

View file

@ -341,7 +341,14 @@
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "no";
extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}";
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [22];