summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Lamar <alain_lamar@yahoo.de>2018-01-02 19:12:09 +0100
committerAlain Lamar <alain_lamar@yahoo.de>2018-01-02 19:12:09 +0100
commitf76f756b8c031226c37a3851074cc26f506ccf2b (patch)
tree4409d4caf52362085f2235a96bdd9f80e3e4d489
parent7a628be1675cca0218c14794a7a07321545ca057 (diff)
downloadvyatta-cfg-system-f76f756b8c031226c37a3851074cc26f506ccf2b.tar.gz
vyatta-cfg-system-f76f756b8c031226c37a3851074cc26f506ccf2b.zip
T122: Added a config node to implement sshd_config's AllowGroups
-rw-r--r--templates/service/ssh/access-control/allow-groups/node.def11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/service/ssh/access-control/allow-groups/node.def b/templates/service/ssh/access-control/allow-groups/node.def
new file mode 100644
index 00000000..2d6aa75b
--- /dev/null
+++ b/templates/service/ssh/access-control/allow-groups/node.def
@@ -0,0 +1,11 @@
+type: txt
+help: Configure sshd_config access control for allowed groups.
+comp_help: The SSH user and group access control directives (allow/deny) are processed in the following order: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups. Multiple groups can be specified as a comma-separated list.
+
+create: sudo sed -i -e '$ a \
+AllowGroups $VAR(@)' /etc/ssh/sshd_config
+
+delete: sudo sed -i -e '/^AllowGroups $VAR(@)$/d' /etc/ssh/sshd_config
+
+update: sudo sed -i -e '/^AllowGroups.*$/c \
+AllowGroups $VAR(@)' /etc/ssh/sshd_config