summarylogtreecommitdiffstats
path: root/sshd.sudoers
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.sudoers')
-rw-r--r--sshd.sudoers11
1 files changed, 11 insertions, 0 deletions
diff --git a/sshd.sudoers b/sshd.sudoers
new file mode 100644
index 000000000000..3779fb2d387e
--- /dev/null
+++ b/sshd.sudoers
@@ -0,0 +1,11 @@
+# allow starting SSHD on demand (instead of letting it run all the time)
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl start sshd
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl start sshd.service
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl stop sshd
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl stop sshd.service
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl restart sshd
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl restart sshd.service
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload sshd
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload sshd.service
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload-or-restart sshd
+%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload-or-restart sshd.service