From e93b798eb857223f591f23cd3d46670e846ab0bf Mon Sep 17 00:00:00 2001 From: nd Date: Sat, 21 Mar 2020 22:21:57 +0100 Subject: [PATCH] add support to set settings for groups --- templates/ssh_sshd_config.j2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/ssh_sshd_config.j2 b/templates/ssh_sshd_config.j2 index 4756c7a..b9f8f71 100644 --- a/templates/ssh_sshd_config.j2 +++ b/templates/ssh_sshd_config.j2 @@ -21,7 +21,7 @@ Subsystem sftp internal-sftp -f AUTH -l INFO {{ i }} {{ ssh.config_override[i] }} {% endfor %} -# add special rules for users defined in host variables +# add special rules for users and groups defined in host variables {% for i in ssh.user %} Match User {{ i }} @@ -29,3 +29,10 @@ Match User {{ i }} {{ j }} {{ ssh.user[i][j] }} {% endfor %} {% endfor %} + +{% for i in ssh.group %} +Match Group {{ i }} +{% for j in ssh.group[i]|d({}) %} + {{ j }} {{ ssh.group[i][j] }} +{% endfor %} +{% endfor %}