Strengthen SSH auth

This commit is contained in:
Victor Mignot 2024-07-27 11:43:04 +02:00
parent 67acb4e852
commit 1f09872ea7
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D

View file

@ -10,7 +10,13 @@ with lib;
config = { config = {
services.openssh = mkIf config.server.networking.enableSSH { services.openssh = mkIf config.server.networking.enableSSH {
enable = true; enable = true;
settings.PermitRootLogin = "no"; settings = {
StrictModes = true;
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitEmptyPasswords = "no";
};
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [