summaryrefslogtreecommitdiff
path: root/templates/service
diff options
context:
space:
mode:
Diffstat (limited to 'templates/service')
-rw-r--r--templates/service/ssh/password-authentication/node.def14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/service/ssh/password-authentication/node.def b/templates/service/ssh/password-authentication/node.def
new file mode 100644
index 00000000..c17dd47c
--- /dev/null
+++ b/templates/service/ssh/password-authentication/node.def
@@ -0,0 +1,14 @@
+type: bool
+default: true
+help: Allow user's to login with password
+update: if [ "$VAR(@)" == "true" ];
+ then regex='/^PasswordAuthentication/s/no/yes/'
+ else regex='/^PasswordAuthentication/s/yes/no/'
+ fi
+ sudo sed -i -e "$regex" /etc/ssh/sshd_config
+
+comp_help: possible completions:
+ true Allow authentication with password
+ false Disable authentication with password (secure)
+
+allowed: echo "true false"