sec: harden ssh config
This commit is contained in:
@@ -4,6 +4,14 @@ in {
|
|||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ sshPort ];
|
ports = [ sshPort ];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||||
|
|||||||
Reference in New Issue
Block a user