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

Commit

Permalink
Merge pull request #300 from divialth/feature/customize_sshd_x11forward
Browse files Browse the repository at this point in the history
allow customization of X11Forwarding
  • Loading branch information
rndmh3ro authored Jul 6, 2020
2 parents 9a3d089 + b5780c9 commit 5b96f66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
|`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. |
|`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.|
|`ssh_allow_agent_forwarding` | false | false to disable Agent Forwarding. Set to true to allow Agent Forwarding.|
|`ssh_x11_forwarding` | false | false to disable X11 Forwarding. Set to true to allow X11 Forwarding.|
|`ssh_pam_support` | true | true if SSH has PAM support.|
|`ssh_use_pam` | true | false to disable pam authentication.|
|`ssh_gssapi_support` | false | true if SSH has GSSAPI support.|
Expand Down Expand Up @@ -61,7 +62,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
|`ssh_client_port` | `'22'` | Specifies the port number to connect on the remote host. |
|`ssh_client_compression` | `false` | Specifies whether the client requests compression. |
|`ssh_compression` | `false` | Specifies whether server-side compression is enabled after the user has authenticated successfully. |
|`ssh_login_grace_time` | `30s` | specifies the time allowed for successful authentication to the SSH server |
|`ssh_login_grace_time` | `30s` | specifies the time allowed for successful authentication to the SSH server |
|`ssh_max_auth_retries` | `2` | Specifies the maximum number of authentication attempts permitted per connection. |
|`ssh_max_sessions` | `10` | Specifies the maximum number of open sessions permitted from a given connection. |
|`ssh_print_debian_banner` | `false` | `true` to print debian specific banner |
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ ssh_gateway_ports: false # sshd
# false to disable Agent Forwarding. Set to true to allow Agent Forwarding.
ssh_allow_agent_forwarding: false # sshd

# false to disable X11 Forwarding. Set to true to allow X11 Forwarding.
ssh_x11_forwarding: false # sshd

# true if SSH has PAM support
ssh_pam_support: true

Expand Down
2 changes: 1 addition & 1 deletion templates/opensshd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ GatewayPorts no
{% endif %}

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

# User environment configuration
Expand Down

0 comments on commit 5b96f66

Please sign in to comment.