diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-28 09:30:04 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-28 10:11:57 -0800 |
commit | d427aff1a7c7902e6eade012956c5ec9060cc60b (patch) | |
tree | e559f5c5dff49eca25ae1a3576886ac56b7767e1 /templates/service/ssh/allow-root/node.def | |
parent | b8300c77e22acb1569e15a4977be20ef3a7d5cfe (diff) | |
download | vyatta-cfg-system-d427aff1a7c7902e6eade012956c5ec9060cc60b.tar.gz vyatta-cfg-system-d427aff1a7c7902e6eade012956c5ec9060cc60b.zip |
fix ssh allow-root template
Bugfix: 2909
1. Change name so telnet and ssh syntax are similar
2. Fix to always return true so update suceeds
3. No need to delete entry on removal of ssh service
Diffstat (limited to 'templates/service/ssh/allow-root/node.def')
-rw-r--r-- | templates/service/ssh/allow-root/node.def | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/service/ssh/allow-root/node.def b/templates/service/ssh/allow-root/node.def new file mode 100644 index 00000000..f476087d --- /dev/null +++ b/templates/service/ssh/allow-root/node.def @@ -0,0 +1,15 @@ +type: bool +default: false +help: Enable/disable root login over ssh +update: if [ \"$VAR(@)\" == \"true\" ]; then + sudo ed - /etc/ssh/sshd_config <<-"EOF" + /^PermitRootLogin/s/no/yes/ + wq + EOF + else + sudo ed - /etc/ssh/sshd_config <<-"EOF" + /^PermitRootLogin/s/yes/no/ + wq + EOF + fi + /bin/true |