File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
roles/ssh_hardening/templates Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,13 @@ RSAAuthentication yes
106106# Disable password-based authentication, it can allow for potentially easier brute-force attacks.
107107PasswordAuthentication {{ 'yes' if ssh_client_password_login else 'no' }}
108108
109+ {# OpenBSD does not support GSSAPIAuthentication, so leave this out if on OpenBSD #}
110+ {% if ansible_facts .os_family != 'OpenBSD' %}
109111# Only use GSSAPIAuthentication if implemented on the network.
110112GSSAPIAuthentication {{ 'yes' if (ssh_gssapi_support|bool) else 'no' }}
111113GSSAPIDelegateCredentials {{ 'yes' if (ssh_gssapi_delegation|bool) else 'no' }}
112114
115+ {% endif %}
113116# Disable tunneling
114117Tunnel no
115118
Original file line number Diff line number Diff line change @@ -143,10 +143,13 @@ KerberosTicketCleanup yes
143143#KerberosGetAFSToken no
144144{% endif %}
145145
146+ {# OpenBSD does not support GSSAPIAuthentication, so leave this out if on OpenBSD #}
147+ {% if ansible_facts .os_family != 'OpenBSD' -%}
146148# Only enable GSSAPI authentication if it is configured.
147149GSSAPIAuthentication {{ 'yes' if ssh_gssapi_support else 'no' }}
148150GSSAPICleanupCredentials yes
149151
152+ {% endif %}
150153{% if ssh_deny_users %}
151154# In case you don't use PAM (`UsePAM no`), you can alternatively restrict users and groups here.
152155# For key-based authentication this is not necessary, since all keys must be explicitely enabled.
You can’t perform that action at this time.
0 commit comments