Skip to content

Commit

Permalink
Merge pull request dev-sec#112 from fti7/permittunnel
Browse files Browse the repository at this point in the history
Added support for PermitTunnel config switch
  • Loading branch information
rndmh3ro committed May 9, 2017
2 parents 95506bb + 7a5fe4c commit 7a90fc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
|`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.|
|`ssh_client_alive_interval` | 600 | specifies an interval for sending keepalive messages |
|`ssh_client_alive_count` | 3 | defines how often keep-alive messages are sent |
|`ssh_permit_tunnel` | false | true if SSH Port Tunneling is required |
|`ssh_remote_hosts` | [] | one or more hosts and their custom options for the ssh-client. Default is empty. See examples in `defaults/main.yml`.|
|`ssh_allow_root_with_key` | false | false to disable root login altogether. Set to true to allow root to login via key-based mechanism.|
|`ssh_allow_tcp_forwarding` | false | false to disable TCP Forwarding. Set to true to allow TCP Forwarding.|
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ ssh_max_auth_retries: 2
ssh_client_alive_interval: 600 # sshd
ssh_client_alive_count: 3 # sshd

# Allow SSH Tunnels
ssh_permit_tunnel: false

# Hosts with custom options. # ssh
# Example:
# ssh_remote_hosts:
Expand Down
2 changes: 1 addition & 1 deletion templates/opensshd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ ClientAliveInterval {{ssh_client_alive_interval}}
ClientAliveCountMax {{ssh_client_alive_count}}

# Disable tunneling
PermitTunnel no
PermitTunnel {{ 'yes' if ssh_permit_tunnel else 'no' }}

# Disable forwarding tcp connections.
# no real advantage without denied shell access
Expand Down

0 comments on commit 7a90fc9

Please sign in to comment.