1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_sshd.git synced 2024-08-16 11:59:49 +02:00

forbid password auth

This commit is contained in:
L3D 2020-03-17 18:52:03 +01:00 committed by Lilian Roller
parent 4c1d0d8cb7
commit 58989a6abf
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B

View file

@ -45,9 +45,13 @@ HostKeyAlgorithms
{%- endfor %} {%- endfor %}
{#
# Client authentication # Client authentication
PasswordAuthentication {{ sshd_password_authentication }} PasswordAuthentication
{%- if sshd.password_authentication | bool -%}
{{ ' yes' }}
{% else -%}
{{ ' no' }}
{% endif %}
ChallengeResponseAuthentication no ChallengeResponseAuthentication no
PubkeyAuthentication yes PubkeyAuthentication yes
@ -56,6 +60,7 @@ PubkeyAuthentication yes
# and ChallengeResponseAuthentication to 'no'. # and ChallengeResponseAuthentication to 'no'.
UsePAM yes UsePAM yes
{#
# User Authentication # User Authentication
{% if restrict_allow_users|default(True) %} {% if restrict_allow_users|default(True) %}
AllowUsers {{ sshd_allow_users|join(' ') }} AllowUsers {{ sshd_allow_users|join(' ') }}