Merge pull request #19138 from nhooyr/openssh
openssh: support prohibit-password for permitRootLogin
commitcd673d3c260558678b8bf7b60feec4a19d762b2d
authorJörg Thalheim <joerg@higgsboson.tk>
dateSun 2 Oct 2016, 15:26 (10 years ago)
parenta745f876891bb1
nixos/modules/services/networking/ssh/sshd.nix+2−2
@@ -102,8 +102,8 @@ in
102102 };
103103
104104 permitRootLogin = mkOption {
105− default = "without-password";
106− type = types.enum ["yes" "without-password" "forced-commands-only" "no"];
105+ default = "prohibit-password";
106+ type = types.enum ["yes" "without-password" "prohibit-password" "forced-commands-only" "no"];
107107 description = ''
108108 Whether the root user can login using ssh.
109109 '';
nixos/modules/virtualisation/amazon-image.nix+1−1
@@ -138,7 +138,7 @@ let cfg = config.ec2; in
138138 # Allow root logins only using the SSH key that the user specified
139139 # at instance creation time.
140140 services.openssh.enable = true;
141− services.openssh.permitRootLogin = "without-password";
141+ services.openssh.permitRootLogin = "prohibit-password";
142142
143143 # Force getting the hostname from EC2.
144144 networking.hostName = mkDefault "";
nixos/modules/virtualisation/azure-common.nix+1−1
@@ -24,7 +24,7 @@ with lib;
2424 # Allow root logins only using the SSH key that the user specified
2525 # at instance creation time, ping client connections to avoid timeouts
2626 services.openssh.enable = true;
27− services.openssh.permitRootLogin = "without-password";
27+ services.openssh.permitRootLogin = "prohibit-password";
2828 services.openssh.extraConfig = ''
2929 ClientAliveInterval 180
3030 '';
nixos/modules/virtualisation/brightbox-image.nix+1−1
@@ -103,7 +103,7 @@ in
103103 # Allow root logins only using the SSH key that the user specified
104104 # at instance creation time.
105105 services.openssh.enable = true;
106− services.openssh.permitRootLogin = "without-password";
106+ services.openssh.permitRootLogin = "prohibit-password";
107107
108108 # Force getting the hostname from Google Compute.
109109 networking.hostName = mkDefault "";
nixos/modules/virtualisation/google-compute-image.nix+1−1
@@ -111,7 +111,7 @@ in
111111 # Allow root logins only using the SSH key that the user specified
112112 # at instance creation time.
113113 services.openssh.enable = true;
114− services.openssh.permitRootLogin = "without-password";
114+ services.openssh.permitRootLogin = "prohibit-password";
115115 services.openssh.passwordAuthentication = mkDefault false;
116116
117117 # Force getting the hostname from Google Compute.
nixos/modules/virtualisation/nova-image.nix+1−1
@@ -31,7 +31,7 @@ with lib;
3131
3232 # Allow root logins
3333 services.openssh.enable = true;
34− services.openssh.permitRootLogin = "without-password";
34+ services.openssh.permitRootLogin = "prohibit-password";
3535
3636 # Put /tmp and /var on /ephemeral0, which has a lot more space.
3737 # Unfortunately we can't do this with the `fileSystems' option