- Change PermitRootLogin from 'no' to 'prohibit-password' (key-only) - Add forgejo-deploy public key to root's authorized_keys - Revert deploy-rs user back to root (needs root for activation) Root can only login via SSH key, password auth remains disabled.
17 lines
284 B
Nix
17 lines
284 B
Nix
{
|
|
outputs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
outputs.nixosModules.openssh
|
|
];
|
|
|
|
services.openssh.enable = true;
|
|
|
|
# Root SSH key for deploy-rs (key-only, no password)
|
|
users.users.root.openssh.authorizedKeys.keyFiles = [
|
|
../../../users/steffen/pubkeys/forgejo-deploy.pub
|
|
];
|
|
}
|