Sshd: switch to new format

This commit is contained in:
Filippo Berto 2023-06-05 12:16:49 +02:00
parent 8890aa7e2d
commit 8483e70dd4
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
2 changed files with 9 additions and 6 deletions

View file

@ -2,8 +2,10 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
# permitRootLogin = "prohibit-password"; settings = {
passwordAuthentication = false; # PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
}; };
users.users.root = { users.users.root = {
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [

View file

@ -2,10 +2,11 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
settings = {
kbdInteractiveAuthentication = lib.mkDefault false; KbdInteractiveAuthentication = lib.mkDefault false;
permitRootLogin = lib.mkDefault "prohibit-password"; PermitRootLogin = lib.mkDefault "prohibit-password";
passwordAuthentication = lib.mkDefault false; PasswordAuthentication = lib.mkDefault false;
};
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [