diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-14 12:05:09 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-14 12:05:09 -0500 |
commit | 3727e7bd79fe75ff18b1dc6af494dbda940e0971 (patch) | |
tree | 8c4fa53308b74063b4262605a02fcda07cd14d21 /common/ssh.nix |
Batman
Diffstat (limited to 'common/ssh.nix')
-rw-r--r-- | common/ssh.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/ssh.nix b/common/ssh.nix new file mode 100644 index 0000000..de931f5 --- /dev/null +++ b/common/ssh.nix @@ -0,0 +1,16 @@ +{services, networking, ...}: + +{ + 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]; +} |