From a2c46f1eee8169cedd7e2e78e3b3f4d9d3aa907c Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 3 Nov 2023 14:56:19 +0100 Subject: [PATCH] ssh: disable password auth --- template/flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/template/flake.nix b/template/flake.nix index eb98357..7cff87b 100644 --- a/template/flake.nix +++ b/template/flake.nix @@ -64,7 +64,10 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - services.openssh.enable = true; + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile ./nitrokey.pub) ];