This commit is contained in:
Hadi
2024-06-18 09:54:18 +02:00
committed by GitHub
parent 2ccd17867f
commit dc4f3160cc
9 changed files with 68 additions and 25 deletions

View File

@@ -0,0 +1,14 @@
{
services.openssh = {
enable = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = true;
AllowUsers = null; # Allows all users by default. Can be [ "user1" "user2" ]
UseDns = true;
X11Forwarding = false;
PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
};
};
networking.firewall.allowedTCPPorts = [ 22 ];
}