summaryrefslogtreecommitdiff
path: root/templates/service/ssh/allow-root/node.def
blob: 9aa98826b66e491cac05d701325a30283d7efd09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
type: txt
default: false
help: Enable/disable root login over ssh
syntax:expression: $VAR(@) in "true", "false" ; "must be true or false"
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