echo "Using snippet $create_motd_snippet"
$SNIPPET($create_motd_snippet)
+#set $root_ssh_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.320.root-ssh-login.sh"
+echo
+echo "Using snippet $root_ssh_snippet"
+$SNIPPET($root_ssh_snippet)
+
#set $legato_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.350.legato.sh"
echo
echo "Using snippet $legato_snippet"
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+disable_root_ssh_login_pw() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling disable_root_ssh_login_pw() ..."
+ echo
+ log "Disabling SSH access for root with password ..."
+
+ if grep -P -w -i 'PermitRootLogin' /etc/ssh/sshd_config >/dev/null ; then
+ perl -p -i -e 's/^\s*#?\s*PermitRootLogin\s.*/PermitRootLogin without-password/i' /etc/ssh/sshd_config
+ else
+ echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
+ fi
+
+}
+
+disable_root_ssh_login_pw
+
+
+#end raw
+## vim: ts=4 et list