mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-03 19:42:10 +02:00
15
hosts/server/modules/openssh.nix
Normal file
15
hosts/server/modules/openssh.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
# SSH server
|
||||
{
|
||||
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 ];
|
||||
}
|
||||
Reference in New Issue
Block a user