From 89ed6f0c001b336de55e285ed758cb7ac770e18a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 2 Dec 2009 09:36:09 -0800 Subject: Add ability to disable password authentication Part of Bug 3255 --- templates/service/ssh/password-authentication/node.def | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 templates/service/ssh/password-authentication/node.def (limited to 'templates/service/ssh/password-authentication/node.def') 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" -- cgit v1.2.3