Better deployment keys separation

This commit is contained in:
Filippo Berto 2023-01-12 12:21:31 +01:00
parent 9b026f8a05
commit 2a46d9d455
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
7 changed files with 46 additions and 29 deletions

View file

@ -1,12 +1,13 @@
{ config, ... }: {
{
services.openssh = {
enable = true;
openFirewall = true;
permitRootLogin = "prohibit-password";
passwordAuthentication = false;
kbdInteractiveAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = config.users.users.bertof.openssh.authorizedKeys.keys or [ ];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKp1Rfb2acLM/5TDUahu+AdV/HVw+hoOTdQIeQIjV5p8"
];
}