Skip to content

Commit 5d55d29

Browse files
authored
Merge pull request #403 from wzzrd/gssapi_client_support
Extend GSSAPI configuration support to ssh_config
2 parents 70cd7bb + 64713ce commit 5d55d29

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

roles/ssh_hardening/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ Warning: This role disables root-login on the target server! Please make sure yo
7676
- Description: false to disable pam authentication.
7777
- `ssh_gssapi_support`
7878
- Default: `false`
79-
- Description: true if SSH has GSSAPI support.
79+
- Description: Set to true to enable GSSAPI authentication (both client and server).
80+
- `ssh_gssapi_delegation`
81+
- Default: `false`
82+
- Description: Set to true to enable GSSAPI credential forwarding.
8083
- `ssh_kerberos_support`
8184
- Default: `true`
8285
- Description: true if SSH has Kerberos support.

roles/ssh_hardening/defaults/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,12 @@ ssh_use_pam: true # sshd
9191
# specify AuthenticationMethods
9292
sshd_authenticationmethods: 'publickey'
9393

94-
# true if SSH support GSSAPI
94+
# Set to true to enable GSSAPI authentication (both client and server)
9595
ssh_gssapi_support: false
9696

97+
# Set to true to enable GSSAPI credential forwarding
98+
ssh_gssapi_delegation: false
99+
97100
# if specified, login is disallowed for user names that match one of the patterns.
98101
ssh_deny_users: '' # sshd
99102

roles/ssh_hardening/templates/openssh.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ RSAAuthentication yes
104104
PasswordAuthentication {{ 'yes' if ssh_client_password_login else 'no' }}
105105

106106
# Only use GSSAPIAuthentication if implemented on the network.
107-
GSSAPIAuthentication no
108-
GSSAPIDelegateCredentials no
107+
GSSAPIAuthentication {{ 'yes' if (ssh_gssapi_support|bool) else 'no' }}
108+
GSSAPIDelegateCredentials {{ 'yes' if (ssh_gssapi_delegation|bool) else 'no' }}
109109

110110
# Disable tunneling
111111
Tunnel no

0 commit comments

Comments
 (0)