# sshd_strict_modes: If you want to set StrictModes (check file modes/ownership before accepting login)
# Valid Values: yes or no
# Default: yes
+#
+# sshd_permit_empty_passwords: If you want enable PermitEmptyPasswords to allow empty passwords
+# Valid Values: yes or no
+# Default: no
+
class sshd {
include sshd::client
'' => 'no',
default => $sshd_hostbased_authentication
}
+ $real_sshd_permit_empty_passwords = $sshd_permit_empty_passwords ? {
+ '' => 'no',
+ default => $sshd_permit_empty_passwords
+ }
file { 'sshd_config':
path => '/etc/ssh/sshd_config',
<%- else %>
PasswordAuthentication no
<%- end %>
-#PermitEmptyPasswords no
+
+# To enable empty passwords, change to yes (NOT RECOMMENDED)
+<%- if real_sshd_empty_passwords.to_s == 'yes' then %>
+PermitEmptyPasswords yes
+<% else -%>
+PermitEmptyPasswords no
+<% end -%>
# Change to no to disable s/key passwords
<%- if real_sshd_challenge_response_authentication.to_s == 'yes' then %>
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
+<%- if real_sshd_empty_passwords.to_s == 'yes' then %>
+PermitEmptyPasswords yes
+<% else -%>
PermitEmptyPasswords no
+<% end -%>
# Change to no to disable s/key passwords
<%- if real_sshd_challenge_response_authentication.to_s == 'yes' then %>
<%- else %>
PasswordAuthentication no
<%- end %>
-#PermitEmptyPasswords no
+
+# To enable empty passwords, change to yes (NOT RECOMMENDED)
+<%- if real_sshd_empty_passwords.to_s == 'yes' then %>
+PermitEmptyPasswords yes
+<% else -%>
+PermitEmptyPasswords no
+<% end -%>
# Change to no to disable s/key passwords
<%- if real_sshd_challenge_response_authentication.to_s == 'yes' then %>
<%- else %>
PasswordAuthentication no
<%- end %>
-#PermitEmptyPasswords no
+
+# To enable empty passwords, change to yes (NOT RECOMMENDED)
+<%- if real_sshd_empty_passwords.to_s == 'yes' then %>
+PermitEmptyPasswords yes
+<% else -%>
+PermitEmptyPasswords no
+<% end -%>
# Change to no to disable s/key passwords
<%- if real_sshd_challenge_response_authentication.to_s == 'yes' then %>