Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions templates/opensshd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ Match Group sftponly

{% for item in ssh_server_match_group %}
Match Group {{ item.group }}
{{ item.rules | indent(4) }}
{% for rule in item.rules %}
{{ rule | indent(4) }}
{% endfor %}
{% endfor %}
{% endif %}

Expand All @@ -267,6 +269,8 @@ Match Group {{ item.group }}

{% for item in ssh_server_match_user %}
Match User {{ item.user }}
{{ item.rules | indent(4) }}
{% for rule in item.rules %}
{{ rule | indent(4) }}
{% endfor %}
{% endfor %}
{% endif %}
8 changes: 6 additions & 2 deletions tests/default_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@
#ssh_server_enabled: false
ssh_server_match_group:
- group: 'root'
rules: 'AllowTcpForwarding yes'
rules:
- 'AllowTcpForwarding yes'
- 'AllowAgentForwarding no'
ssh_server_match_user:
- user: 'root'
rules: 'AllowTcpForwarding yes'
rules:
- 'AllowTcpForwarding yes'
- 'AllowAgentForwarding no'
ssh_remote_hosts:
- names: ['example.com', 'example2.com']
options: ['Port 2222', 'ForwardAgent yes']
Expand Down