ssh is a system setting not user
Some checks are pending
Flake.lock / build (push) Waiting to run

This commit is contained in:
Mohamed Chrayed 2024-08-30 22:27:45 +02:00
parent dc8ff6f915
commit 659cc31bc4
2 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,11 @@
{ ... }:
{ user, ... }:
{
services.openssh.enable = true;
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
users.users.${user}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEun1YkEfxTpcsQk7ZIwuVTcSsVHjwuKA7xOW4TAi3SE mo@workstation"
];
}

View File

@ -1,6 +0,0 @@
{ user, ... }:
{
users.users.${user}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEun1YkEfxTpcsQk7ZIwuVTcSsVHjwuKA7xOW4TAi3SE mo@workstation"
];
}