nix/shared/openssh.nix
2025-04-07 14:19:10 +02:00

16 lines
382 B
Nix

{ config, pkgs, ... }:
{
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
AuthenticationMethods = "publickey password";
TrustedUserCAKeys = "/etc/ssh/ssh_ca.pub";
Banner = "none";
PasswordAuthentication = true;
# PasswordAuthentication = false;
PubKeyAuthentication = true;
Port = 22;
};
};
}