File tree 3 files changed +5
-11
lines changed
3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ This cookbook provides secure ssh-client and ssh-server configurations.
34
34
* ` ['ssh']['remote_hosts'] ` - one or more hosts, to which ssh-client can connect to. Default is empty, but should be configured for security reasons!
35
35
* ` ['ssh']['allow_tcp_forwarding'] ` - ` false ` to disable TCP Forwarding. Set to ` true ` to allow TCP Forwarding
36
36
* ` ['ssh']['allow_agent_forwarding'] ` - ` false ` to disable Agent Forwarding. Set to ` true ` to allow Agent Forwarding
37
+ * ` ['ssh']['allow_x11_forwarding'] ` - ` false ` to disable X11 Forwarding. Set to ` true ` to allow X11 Forwarding
37
38
* ` ['ssh']['use_pam'] ` - ` false ` to disable pam authentication
38
39
* ` ['ssh']['print_motd'] ` - ` false ` to disable printing of the MOTD
39
40
* ` ['ssh']['print_last_log'] ` - ` false ` to disable display of last login information
Original file line number Diff line number Diff line change 58
58
default [ 'ssh' ] [ 'allow_root_with_key' ] = false # sshd
59
59
default [ 'ssh' ] [ 'allow_tcp_forwarding' ] = false # sshd
60
60
default [ 'ssh' ] [ 'allow_agent_forwarding' ] = false # sshd
61
+ default [ 'ssh' ] [ 'allow_x11_forwarding' ] = false # sshd
61
62
default [ 'ssh' ] [ 'use_pam' ] = false # sshd
62
63
default [ 'ssh' ] [ 'deny_users' ] = [ ] # sshd
63
64
default [ 'ssh' ] [ 'allow_users' ] = [ ] # sshd
Original file line number Diff line number Diff line change @@ -156,25 +156,17 @@ PermitTunnel no
156
156
157
157
# Disable forwarding tcp connections.
158
158
# no real advantage without denied shell access
159
- <% if @node['ssh']['allow_tcp_forwarding'] %>
160
- AllowTcpForwarding yes
161
- <% else %>
162
- AllowTcpForwarding no
163
- <% end %>
159
+ AllowTcpForwarding <%= ((@node['ssh']['allow_tcp_forwarding']) ? 'yes' : 'no' ) %>
164
160
165
161
# Disable agent formwarding, since local agent could be accessed through forwarded connection.
166
162
# no real advantage without denied shell access
167
- <% if @node['ssh']['allow_agent_forwarding'] %>
168
- AllowAgentForwarding yes
169
- <% else %>
170
- AllowAgentForwarding no
171
- <% end %>
163
+ AllowAgentForwarding <%= ((@node['ssh']['allow_agent_forwarding']) ? 'yes' : 'no' ) %>
172
164
173
165
# Do not allow remote port forwardings to bind to non-loopback addresses.
174
166
GatewayPorts no
175
167
176
168
# Disable X11 forwarding, since local X11 display could be accessed through forwarded connection.
177
- X11Forwarding no
169
+ X11Forwarding <%= ((@node['ssh']['allow_x11_forwarding']) ? 'yes' : 'no' ) %>
178
170
X11UseLocalhost yes
179
171
180
172
You can’t perform that action at this time.
0 commit comments