From 33346b68ed7155478fd435af963c2eeaf63a5f8a Mon Sep 17 00:00:00 2001 From: Alain Lamar Date: Mon, 1 Jan 2018 12:43:23 +0100 Subject: T122: Add config nodes for user/group access controls in sshd_config --- templates/service/ssh/allow-groups/node.def | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 templates/service/ssh/allow-groups/node.def (limited to 'templates/service/ssh/allow-groups/node.def') diff --git a/templates/service/ssh/allow-groups/node.def b/templates/service/ssh/allow-groups/node.def new file mode 100644 index 00000000..2d6aa75b --- /dev/null +++ b/templates/service/ssh/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 -- cgit v1.2.3