diff --git a/templates/opensshd.conf.j2 b/templates/opensshd.conf.j2 index 4d2f858d8..0ee4bec78 100644 --- a/templates/opensshd.conf.j2 +++ b/templates/opensshd.conf.j2 @@ -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 %} @@ -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 %} diff --git a/tests/default_custom.yml b/tests/default_custom.yml index 78764794d..f89c031fd 100644 --- a/tests/default_custom.yml +++ b/tests/default_custom.yml @@ -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']