firstboot: fix sshd configuration and restart it on firstboot

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I06d06538eee533343e3a05535352e613f3944734
This commit is contained in:
Dongjin Kim
2022-04-25 08:33:58 +09:00
parent 1f4cb4bc7a
commit 4d4dd02384

View File

@@ -23,17 +23,7 @@ resize2fs ${rootdev}
rm -f /etc/ssh/ssh_host* && ssh-keygen -A
case $(cat /sys/firmware/devicetree/base/model) in
"Hardkernel Odroid XU4")
need_tweak="true"
;;
*)
need_tweak="false"
;;
esac
if [ "x${need_tweak}" = "xtrue" ]; then
service ssh restart
fi
sed -i "s/PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config
service ssh restart
exit 0