From a83faa7789ddb8c930a973774e5cedf062e10919 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Thu, 3 Dec 2009 10:55:59 -0800
Subject: SSH enhancements

Add public key support
Convert allow-root and password-authentication from boolean nodes to
regular nodes.
---
 templates/service/ssh/allow-root/node.def | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

(limited to 'templates/service/ssh/allow-root/node.def')

diff --git a/templates/service/ssh/allow-root/node.def b/templates/service/ssh/allow-root/node.def
index 25a5a97a..1c56d221 100644
--- a/templates/service/ssh/allow-root/node.def
+++ b/templates/service/ssh/allow-root/node.def
@@ -1,14 +1,5 @@
-type: bool
-default: false
-help: Enable/disable root login over ssh
-update: if [ "$VAR(@)" == "true" ];
-	then regex='/^PermitRootLogin/s/no/yes/'
-	else regex='/^PermitRootLogin/s/yes/no/'
-	fi
-	sudo sed -i -e "$regex" /etc/ssh/sshd_config
+help: Enable root login over ssh
 
-comp_help: possible completions:
-  true     Enable root login over ssh
-  false    Disable root login over ssh
+update: sudo sed -i -e '/^PermitRootLogin/s/no/yes/' /etc/ssh/sshd_config
 
-allowed: echo "true false"
+delete: sudo sed -i -e '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
-- 
cgit v1.2.3

