Skip to content

Commit cb85a99

Browse files
authored
adding switch for ForwardAgent in ssh_config (#818)
* Update openssh.conf.j2 add switch for FowardAgent * Update openssh.conf.j2 fix typo * Update openssh.conf.j2 change ssh_ForwardAgent to ssh_forward_agent * Update argument_specs.yml adding context for ssh_forward_agent
1 parent 96d318e commit cb85a99

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

roles/ssh_hardening/meta/argument_specs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,6 @@ argument_specs:
365365
default: sandbox
366366
description: Specifies whether sshd separates privileges by creating an unprivileged
367367
child process to deal with incoming network traffic.
368+
ssh_forward_agent:
369+
default: 'no'
370+
description: Enables the ssh forward agent for the Cli if set to 'yes'

roles/ssh_hardening/templates/openssh.conf.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ StrictHostKeyChecking ask
9090

9191
{% endif %}
9292
# Disable agent forwarding, since local agent could be accessed through forwarded connection.
93-
ForwardAgent no
93+
94+
ForwardAgent {{ ((ssh_forward_agent) if ssh_forward_agent is defined else 'no')}}
95+
9496

9597
# Disable X11 forwarding, since local X11 display could be accessed through forwarded connection.
9698
ForwardX11 no

0 commit comments

Comments
 (0)