diff options
author | Alain Lamar <alain_lamar@yahoo.de> | 2018-01-02 19:11:24 +0100 |
---|---|---|
committer | Alain Lamar <alain_lamar@yahoo.de> | 2018-01-02 19:11:24 +0100 |
commit | 7a628be1675cca0218c14794a7a07321545ca057 (patch) | |
tree | e461c7d6dc9a0f4bbb7b28dfa7c174ce25128792 /templates | |
parent | 082dd8fa2190bb4a0df818b827736766a77cf0bc (diff) | |
download | vyatta-cfg-system-7a628be1675cca0218c14794a7a07321545ca057.tar.gz vyatta-cfg-system-7a628be1675cca0218c14794a7a07321545ca057.zip |
T122: Added a config node to implement sshd_config's AllowUsers
Diffstat (limited to 'templates')
-rw-r--r-- | templates/service/ssh/access-control/allow-users/node.def | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/service/ssh/access-control/allow-users/node.def b/templates/service/ssh/access-control/allow-users/node.def new file mode 100644 index 00000000..2052bf69 --- /dev/null +++ b/templates/service/ssh/access-control/allow-users/node.def @@ -0,0 +1,11 @@ +type: txt +help: Configure sshd_config access control for allowed users. +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 users can be specified as a comma-separated list. + +create: sudo sed -i -e '$ a \ +AllowUsers $VAR(@)' /etc/ssh/sshd_config + +delete: sudo sed -i -e '/^AllowUsers $VAR(@)$/d' /etc/ssh/sshd_config + +update: sudo sed -i -e '/^AllowUsers.*$/c \ +AllowUsers $VAR(@)' /etc/ssh/sshd_config |