Skip to content

Commit 79fc236

Browse files
committed
Make ForwardAgent configurable for Client Configuration
1 parent 0f505ec commit 79fc236

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

attributes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
client['cbc_required'] = false
6161
client['weak_hmac'] = false
6262
client['weak_kex'] = false
63+
client['allow_agent_forwarding'] = false
6364
client['remote_hosts'] = []
6465
client['password_authentication'] = false # ssh
6566
# http://undeadly.org/cgi?action=article&sid=20160114142733

templates/default/openssh.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ KexAlgorithms <%= @kex %>
7575

7676

7777
# Disable agent formwarding, since local agent could be accessed through forwarded connection.
78-
ForwardAgent no
78+
ForwardAgent <%= ((@node['ssh-hardening']['ssh']['client']['allow_agent_forwarding']) ? 'yes' : 'no' ) %>
7979

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

0 commit comments

Comments
 (0)