summaryrefslogtreecommitdiff
path: root/templates/service/ssh/allow-root/node.def
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-02-28 09:30:04 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-02-28 10:11:57 -0800
commitd427aff1a7c7902e6eade012956c5ec9060cc60b (patch)
treee559f5c5dff49eca25ae1a3576886ac56b7767e1 /templates/service/ssh/allow-root/node.def
parentb8300c77e22acb1569e15a4977be20ef3a7d5cfe (diff)
downloadvyatta-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.def15
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