NixOS-Config/modules/system/services/general/ssh/default.nix

22 lines
427 B
Nix
Raw Normal View History

2024-10-09 03:36:08 -04:00
{ ... }:
{
imports = [ ./fail2ban ];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PrintLastLog = "no";
PasswordAuthentication = false;
UsePAM = false;
};
};
2024-11-05 05:49:14 -05:00
environment.persistence."/persist".files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
}