diff --git a/templates/sshd_config.j2 b/templates/sshd_config.j2 index d59a276..3b1446c 100644 --- a/templates/sshd_config.j2 +++ b/templates/sshd_config.j2 @@ -45,9 +45,13 @@ HostKeyAlgorithms {%- endfor %} -{# # Client authentication -PasswordAuthentication {{ sshd_password_authentication }} +PasswordAuthentication +{%- if sshd.password_authentication | bool -%} + yes +{%- else -%} + no +{%- endif %} ChallengeResponseAuthentication no PubkeyAuthentication yes @@ -56,6 +60,7 @@ PubkeyAuthentication yes # and ChallengeResponseAuthentication to 'no'. UsePAM yes +{# # User Authentication {% if restrict_allow_users|default(True) %} AllowUsers {{ sshd_allow_users|join(' ') }}