summaryrefslogtreecommitdiff
path: root/templates/service/ssh/root-allowed/node.def
blob: 8c5a6fd90cf262596a5488f434298b6139fea5ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
type: bool
help: Allow root login over ssh
default: false
help: Enable/disable root login
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
delete:	sudo ed - /etc/ssh/sshd_config <<-"EOF"
	/^PermitRootLogin/s/yes/no/
	wq
	EOF