diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-02 09:36:09 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-02 09:36:09 -0800 |
commit | 89ed6f0c001b336de55e285ed758cb7ac770e18a (patch) | |
tree | 8fc6b24350b4b6467d645dcff643680edb743123 /templates/service | |
parent | 6611cfc04066a175992f9715f82563ddee8c3f5a (diff) | |
download | vyatta-cfg-system-89ed6f0c001b336de55e285ed758cb7ac770e18a.tar.gz vyatta-cfg-system-89ed6f0c001b336de55e285ed758cb7ac770e18a.zip |
Add ability to disable password authentication
Part of Bug 3255
Diffstat (limited to 'templates/service')
-rw-r--r-- | templates/service/ssh/password-authentication/node.def | 14 |
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" |