Skip to content

Commit

Permalink
adding switch for ForwardAgent in ssh_config (#818)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Shizzlebix authored Nov 11, 2024
1 parent 96d318e commit cb85a99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions roles/ssh_hardening/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,6 @@ argument_specs:
default: sandbox
description: Specifies whether sshd separates privileges by creating an unprivileged
child process to deal with incoming network traffic.
ssh_forward_agent:
default: 'no'
description: Enables the ssh forward agent for the Cli if set to 'yes'
4 changes: 3 additions & 1 deletion roles/ssh_hardening/templates/openssh.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ StrictHostKeyChecking ask

{% endif %}
# Disable agent forwarding, since local agent could be accessed through forwarded connection.
ForwardAgent no

ForwardAgent {{ ((ssh_forward_agent) if ssh_forward_agent is defined else 'no')}}


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

0 comments on commit cb85a99

Please sign in to comment.