diff options
| author | Dominik Kaiser | 2025-02-16 11:53:00 +0100 |
|---|---|---|
| committer | Dominik Kaiser | 2025-02-16 11:53:00 +0100 |
| commit | 6dfb9c4eb46ffda2b8c49a40f6b0b95c5f2adc95 (patch) | |
| tree | a2a07ca686a185e646d7c4b28dd7b540fea62972 | |
| parent | b73e524cefb7878a8d3fd197f0e6dd4a71338cbc (diff) | |
| download | nixos-6dfb9c4eb46ffda2b8c49a40f6b0b95c5f2adc95.tar.gz nixos-6dfb9c4eb46ffda2b8c49a40f6b0b95c5f2adc95.zip | |
Disable root login on antares
| -rw-r--r-- | hosts/antares/configuration.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/hosts/antares/configuration.nix b/hosts/antares/configuration.nix index 6e05e75..8d7be14 100644 --- a/hosts/antares/configuration.nix +++ b/hosts/antares/configuration.nix @@ -16,8 +16,11 @@ 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"; @@ -37,10 +40,6 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtL2eG098LhkFPR4N5e44XMq60uvCUCOuKMYs5zjg6f" ]; }; - users.users.root.openssh.authorizedKeys.keys = [ - # change this to your ssh key - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtL2eG098LhkFPR4N5e44XMq60uvCUCOuKMYs5zjg6f dk@nixos" - ]; system.stateVersion = "24.05"; } |
