kick out root from ssh

This commit is contained in:
Grigory Shipunov 2023-08-05 21:06:23 +02:00
parent 9e5d5bd874
commit 57dca23048

View file

@ -3,12 +3,9 @@
programs.mosh.enable = true;
services.openssh = {
enable = true;
settings.PermitRootLogin = "prohibit-password";
settings.PermitRootLogin = "no";
settings.PasswordAuthentication = false;
};
networking.firewall.allowedTCPPorts = [ 22 ];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHv82n6F6kwJ3/EMYlOoCc1/NaYFW7QHC5F8jKVzdlio gshipunov@toaster"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3to/h8Myn+zXAkjboaRVqOfmtDz7VpIHhHbaRoYyPX g.shipunov@uva.nl"
];
}