From 67388a2d29be80e4e650ea061b7f85b2805dccc5 Mon Sep 17 00:00:00 2001 From: joy Date: Sun, 18 Aug 2024 15:27:23 +0200 Subject: [PATCH] ssh --- modules/ssh/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix index d871699..d70339a 100644 --- a/modules/ssh/default.nix +++ b/modules/ssh/default.nix @@ -1,13 +1,17 @@ { ... }: { - services.openssh = { - enable = true; - authorizedKeysFiles = [ - - ]; - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + AllowUsers = null; + }; + }; + + users.users.joy = { + isNormalUser = true; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8FnfVKPbbzPmZ3L0KuSMc8GD42rkIoIMay3c/r9zGkMBwRyluwP7OBR7SaTlp/w7iPHom3YwhGYa37HOXp/icSEMvFlYsCQOXWPkf7cNqyhEnycRsMojpKP2a6qxvcnuuCLY+xMwtlsX1h4nJFpsWHb2A62qBgdaOVrBlbVGd2ZuVCgiB+eenVagW3EFAO9jK5r6rSFciND7EMxBKfi6DbRma6UCejwGjpU0AHCZDikw5XKFhLUDbhdb9e02gyQxD5cs4Q2CuZ1PVt+Jb1GwHVnfh3wdEz5v7TWF+RUv85JXlRLrIYd2SEDpA6yvQIIT4YR2Bb1Tc/aC+zTdUdP+HMiBI32GGyplMfrE1dbj3quTfGN6cJ0TfPFOx7K+0N108fM7mehPtGT/uyB9nnMyYeLO45cgA1wMZZcT4egSvnnqe+6NO7j+zR0whl8+SbIru7HUK2Oa67SzxotQ7D8F27rx02Ie4UJqwbPsZGrxL7TlvNKUXQ4mOINkyE79tIshWncO71O6vJWzaoeYiye0mxc0AP3vYozdV3MgN34+5zscb/o4pwOQtthin8Nf1Y6o6H0poUz5YXYBdEKK/O0Wz3kxT6i/oZWZG7a18xCCKYnF1Jgdr7mfxkizLMkRqYsgM9CS0e0KoVJhu78TmMz8Eip9za1ncvGg3w1ZW6VG/6w==" + ]; }; -}; }