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

Commit 596d291

Browse files
authored
Merge pull request #112 from fti7/permittunnel
Added support for PermitTunnel config switch
2 parents bce8703 + c1876bf commit 596d291

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
3030
|`ssh_host_key_files` | ['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_dsa_key', '/etc/ssh/ssh_host_ecdsa_key'] |Host keys to look for when starting sshd.|
3131
|`ssh_client_alive_interval` | 600 | specifies an interval for sending keepalive messages |
3232
|`ssh_client_alive_count` | 3 | defines how often keep-alive messages are sent |
33+
|`ssh_permit_tunnel` | false | true if SSH Port Tunneling is required |
3334
|`ssh_remote_hosts` | [] | one or more hosts and their custom options for the ssh-client. Default is empty. See examples in `defaults/main.yml`.|
3435
|`ssh_allow_root_with_key` | false | false to disable root login altogether. Set to true to allow root to login via key-based mechanism.|
3536
|`ssh_allow_tcp_forwarding` | false | false to disable TCP Forwarding. Set to true to allow TCP Forwarding.|

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ ssh_max_auth_retries: 2
3939
ssh_client_alive_interval: 600 # sshd
4040
ssh_client_alive_count: 3 # sshd
4141

42+
# Allow SSH Tunnels
43+
ssh_permit_tunnel: false
44+
4245
# Hosts with custom options. # ssh
4346
# Example:
4447
# ssh_remote_hosts:

templates/opensshd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ ClientAliveInterval {{ssh_client_alive_interval}}
173173
ClientAliveCountMax {{ssh_client_alive_count}}
174174

175175
# Disable tunneling
176-
PermitTunnel no
176+
PermitTunnel {{ 'yes' if ssh_permit_tunnel else 'no' }}
177177

178178
# Disable forwarding tcp connections.
179179
# no real advantage without denied shell access

0 commit comments

Comments
 (0)