Skip to content

Commit

Permalink
Fix sshd config - set AcceptEnv conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
swalkinshaw committed Dec 11, 2022
1 parent 5864220 commit 19db8da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roles/sshd/templates/sshd_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ ListenAddress {{ address }}

Protocol {{ sshd_protocol }}

AcceptEnv {{ sshd_accept_env | join(' ') }}
{% if AcceptEnv | count %}
AcceptEnv {{ sshd_accept_env | join(' ') }}
{% endif -%}
AllowAgentForwarding {{ sshd_allow_agent_forwarding | ternary('yes', 'no') }}
AllowTcpForwarding {{ sshd_allow_tcp_forwarding is string | ternary(sshd_allow_tcp_forwarding, sshd_allow_tcp_forwarding | ternary('yes', 'no')) }}
ChallengeResponseAuthentication {{ sshd_challenge_response_authentication | ternary('yes', 'no') }}
Expand Down

0 comments on commit 19db8da

Please sign in to comment.