Skip to content

Commit 72aff75

Browse files
authored
Allow VS Code Remote SSH while blocking NFS mounts (#799)
1 parent b504f10 commit 72aff75

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ansible/roles/sshd/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ Configure sshd.
66

77
- `sshd_password_authentication`: Optional bool. Whether to enable password login. Default `false`.
88
- `sshd_disable_forwarding`: Optional bool. Whether to disable all forwarding features (X11, ssh-agent, TCP and StreamLocal). Default `true`.
9+
- `sshd_allow_local_forwarding`: Optional bool. Whether to allow limited forwarding for the Visual Studio Code Remote - SSH extension. Use together with `sshd_disable_forwarding: false`. NOTE THIS MAY BE INSECURE! Default `false`.
910
- `sshd_conf_src`: Optional string. Path to sshd configuration template. Default is in-role template.
1011
- `sshd_conf_dest`: Optional string. Path to destination for sshd configuration file. Default is `/etc/ssh/sshd_config.d/10-ansible.conf` which overrides `50-{cloud-init,redhat}` files, if present.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
sshd_password_authentication: false
33
sshd_disable_forwarding: true
4+
sshd_allow_local_forwarding: false
45
sshd_conf_src: sshd.conf.j2
56
sshd_conf_dest: /etc/ssh/sshd_config.d/10-ansible.conf
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# {{ ansible_managed }}
22
PasswordAuthentication {{ 'yes' if sshd_password_authentication | bool else 'no' }}
33
DisableForwarding {{ 'yes' if sshd_disable_forwarding | bool else 'no' }}
4+
{% if sshd_allow_local_forwarding %}
5+
AllowTcpForwarding local
6+
PermitOpen 127.0.0.1:*
7+
{% endif %}

0 commit comments

Comments
 (0)