summaryrefslogtreecommitdiff
path: root/common/ssh.nix
blob: de931f553e0667c6c7d2fba10a850170aec6c6e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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];
}