Commit 3f5c8e4a authored by David Johnson's avatar David Johnson

Use the older version of PermitRootLogin without-password.

(prohibit-password does not arrive until 7.x .)
parent 25525036
......@@ -155,10 +155,10 @@ fixup_mounted_image() {
echo "*** $_imgfile: setting up sshd ..."
grep -q '[# ]*PermitRootLogin .*' $MNT/etc/ssh/sshd_config
if [ $? -eq 0 ]; then
sed -i -e 's/^[# ]*PermitRootLogin .*$/PermitRootLogin prohibit-password/' \
sed -i -e 's/^[# ]*PermitRootLogin .*$/PermitRootLogin without-password/' \
$MNT/etc/ssh/sshd_config
else
echo "PermitRootLogin prohibit-password" >> $MNT/etc/ssh/sshd_config
echo "PermitRootLogin without-password" >> $MNT/etc/ssh/sshd_config
fi
grep -q '[# ]*PasswordAuthentication .*' $MNT/etc/ssh/sshd_config
if [ $? -eq 0 ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment