diff options
author | Alain Lamar <alain_lamar@yahoo.de> | 2018-01-02 19:16:00 +0100 |
---|---|---|
committer | Alain Lamar <alain_lamar@yahoo.de> | 2018-01-02 19:16:00 +0100 |
commit | 9b6efe5342a2d555dc4d5e5bb15671e72fe36f41 (patch) | |
tree | 8abeec3e00790ee66791bfdab4f44d9c578cb961 /templates/service | |
parent | ccbfc90fdb6239d30613fb28b76144c03c2d9809 (diff) | |
parent | 33346b68ed7155478fd435af963c2eeaf63a5f8a (diff) | |
download | vyatta-cfg-system-9b6efe5342a2d555dc4d5e5bb15671e72fe36f41.tar.gz vyatta-cfg-system-9b6efe5342a2d555dc4d5e5bb15671e72fe36f41.zip |
Merge branch 't122-sshd' of https://github.com/alainlamar/vyatta-cfg-system into t122-sshd
Diffstat (limited to 'templates/service')
-rw-r--r-- | templates/service/ssh/allow-groups/node.def | 11 | ||||
-rw-r--r-- | templates/service/ssh/allow-users/node.def | 11 | ||||
-rw-r--r-- | templates/service/ssh/deny-groups/node.def | 11 | ||||
-rw-r--r-- | templates/service/ssh/deny-users/node.def | 11 | ||||
-rw-r--r-- | templates/service/ssh/sshd-option/node.def | 8 |
5 files changed, 52 insertions, 0 deletions
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 diff --git a/templates/service/ssh/allow-users/node.def b/templates/service/ssh/allow-users/node.def new file mode 100644 index 00000000..2052bf69 --- /dev/null +++ b/templates/service/ssh/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 diff --git a/templates/service/ssh/deny-groups/node.def b/templates/service/ssh/deny-groups/node.def new file mode 100644 index 00000000..c2c8dcab --- /dev/null +++ b/templates/service/ssh/deny-groups/node.def @@ -0,0 +1,11 @@ +type: txt +help: Configure sshd_config access control for disallowed 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 \ +DenyGroups $VAR(@)' /etc/ssh/sshd_config + +delete: sudo sed -i -e '/^DenyGroups $VAR(@)$/d' /etc/ssh/sshd_config + +update: sudo sed -i -e '/^DenyGroups.*$/c \ +DenyGroups $VAR(@)' /etc/ssh/sshd_config diff --git a/templates/service/ssh/deny-users/node.def b/templates/service/ssh/deny-users/node.def new file mode 100644 index 00000000..a6426f90 --- /dev/null +++ b/templates/service/ssh/deny-users/node.def @@ -0,0 +1,11 @@ +type: txt +help: Configure sshd_config access control for disallowed 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 \ +DenyUsers $VAR(@)' /etc/ssh/sshd_config + +delete: sudo sed -i -e '/^DenyUsers $VAR(@)$/d' /etc/ssh/sshd_config + +update: sudo sed -i -e '/^DenyUsers.*$/c \ +DenyUsers $VAR(@)' /etc/ssh/sshd_config diff --git a/templates/service/ssh/sshd-option/node.def b/templates/service/ssh/sshd-option/node.def new file mode 100644 index 00000000..7f6ec7ec --- /dev/null +++ b/templates/service/ssh/sshd-option/node.def @@ -0,0 +1,8 @@ +multi: +type: txt +help: Additional options for sshd_config + +create: sudo sed -i -e '$ a \ +$VAR(@)' /etc/ssh/sshd_config + +delete: sudo sed -i -e '/^$VAR(@)$/d' /etc/ssh/sshd_config |