Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit 5b96f66

Browse files
authored
Merge pull request #300 from divialth/feature/customize_sshd_x11forward
allow customization of X11Forwarding
2 parents 9a3d089 + b5780c9 commit 5b96f66

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
3131
|`ssh_allow_tcp_forwarding` | no | `'no'` to disable TCP Forwarding. Set to `'yes'` to allow TCP Forwarding. If you are using OpenSSH >= 6.2 version, you can specify `'yes'`, `'no'`, `'all'` or `'local'`. <br> *Note*: values passed to this variable must be strings, thus values `'yes'` and `'no'` should be passed with quotes. |
3232
|`ssh_gateway_ports` | `false` | `false` to disable binding forwarded ports to non-loopback addresses. Set to `true` to force binding on wildcard address. Set to `clientspecified` to allow the client to specify which address to bind to.|
3333
|`ssh_allow_agent_forwarding` | false | false to disable Agent Forwarding. Set to true to allow Agent Forwarding.|
34+
|`ssh_x11_forwarding` | false | false to disable X11 Forwarding. Set to true to allow X11 Forwarding.|
3435
|`ssh_pam_support` | true | true if SSH has PAM support.|
3536
|`ssh_use_pam` | true | false to disable pam authentication.|
3637
|`ssh_gssapi_support` | false | true if SSH has GSSAPI support.|
@@ -61,7 +62,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
6162
|`ssh_client_port` | `'22'` | Specifies the port number to connect on the remote host. |
6263
|`ssh_client_compression` | `false` | Specifies whether the client requests compression. |
6364
|`ssh_compression` | `false` | Specifies whether server-side compression is enabled after the user has authenticated successfully. |
64-
|`ssh_login_grace_time` | `30s` | specifies the time allowed for successful authentication to the SSH server |
65+
|`ssh_login_grace_time` | `30s` | specifies the time allowed for successful authentication to the SSH server |
6566
|`ssh_max_auth_retries` | `2` | Specifies the maximum number of authentication attempts permitted per connection. |
6667
|`ssh_max_sessions` | `10` | Specifies the maximum number of open sessions permitted from a given connection. |
6768
|`ssh_print_debian_banner` | `false` | `true` to print debian specific banner |

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ ssh_gateway_ports: false # sshd
7171
# false to disable Agent Forwarding. Set to true to allow Agent Forwarding.
7272
ssh_allow_agent_forwarding: false # sshd
7373

74+
# false to disable X11 Forwarding. Set to true to allow X11 Forwarding.
75+
ssh_x11_forwarding: false # sshd
76+
7477
# true if SSH has PAM support
7578
ssh_pam_support: true
7679

templates/opensshd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ GatewayPorts no
206206
{% endif %}
207207

208208
# Disable X11 forwarding, since local X11 display could be accessed through forwarded connection.
209-
X11Forwarding no
209+
X11Forwarding {{ 'yes' if (ssh_x11_forwarding|bool) else 'no' }}
210210
X11UseLocalhost yes
211211

212212
# User environment configuration

0 commit comments

Comments
 (0)