generation 491 25.11.20250714.62e0f05
This commit is contained in:
19
hosts/server/ssh.nix
Normal file
19
hosts/server/ssh.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Disable password login for security
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
services.openssh.settings.PermitRootLogin = "no";
|
||||
|
||||
# Add your authorized key for a specific user
|
||||
users.users.yourusername = {
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
config.age.secrets.ssh-pub
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user