From 38ccadbc876ab9ae4f27d3e84a31f57bee10af3b Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 8 Jun 2025 21:05:21 +0530 Subject: Switch to ssh key --- modules/network/ssh.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/network/ssh.nix') diff --git a/modules/network/ssh.nix b/modules/network/ssh.nix index e4e5b2a..573bdf4 100644 --- a/modules/network/ssh.nix +++ b/modules/network/ssh.nix @@ -5,7 +5,10 @@ in { services.sshd.enable = true; # Auth - # TODO: dont allow via password - # openssh.authorizedKeys.keys = private.ssh.authorizedKeys; - services.openssh.settings.PermitRootLogin = "yes"; + users.users.bacchus.openssh.authorizedKeys.keys = private.ssh.authorizedKeys; + services.openssh.settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + ChallengeResponseAuthentication = false; + }; } -- cgit v1.3.1