]> git.dkaiser.de - config/nixos.git/commitdiff
Disable root login on antares
authorDominik Kaiser <dominik-kaiser@mailbox.org>
Sun, 16 Feb 2025 10:53:00 +0000 (11:53 +0100)
committerDominik Kaiser <dominik-kaiser@mailbox.org>
Sun, 16 Feb 2025 10:53:00 +0000 (11:53 +0100)
hosts/antares/configuration.nix

index 6e05e7507274fe3d3942c8f7b880af614c55ff02..8d7be14ae27bcd26bc7056a014af1428fa5aa4c6 100644 (file)
     efiSupport = true;
     efiInstallAsRemovable = true;
   };
-  services.openssh.enable = true;
-  services.openssh.passwordAuthentication = false;
+  services.openssh = {
+    enable = true;
+    passwordAuthentication = false;
+    permitRootLogin = false;
+  };
 
   networking.hostName = "antares";
   time.timeZone = "Europe/Berlin";
       "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtL2eG098LhkFPR4N5e44XMq60uvCUCOuKMYs5zjg6f"
     ];
   };
-  users.users.root.openssh.authorizedKeys.keys = [
-    # change this to your ssh key
-    "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtL2eG098LhkFPR4N5e44XMq60uvCUCOuKMYs5zjg6f dk@nixos"
-  ];
 
   system.stateVersion = "24.05";
 }