From 4dddea633a0734c1e2afe26216ffa49a921fd191 Mon Sep 17 00:00:00 2001 From: Dongjin Kim Date: Thu, 18 Jul 2024 18:11:36 +0900 Subject: [PATCH] firstboot: fix to enable PasswordAuthentication Signed-off-by: Dongjin Kim Change-Id: I8ac07f3febf9d0575d8cddb53e7b2eb1f6b3742c --- overlay/root/firstboot.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/overlay/root/firstboot.sh b/overlay/root/firstboot.sh index 61fec89..f50b6b3 100755 --- a/overlay/root/firstboot.sh +++ b/overlay/root/firstboot.sh @@ -23,7 +23,10 @@ resize2fs ${rootdev} rm -f /etc/ssh/ssh_host* && ssh-keygen -A -sed -i "s/^PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config +for sshd_config in /etc/ssh/sshd_config \ + /etc/ssh/sshd_config.d/60-cloudimg-settings.conf; do + sed -i "s/^PasswordAuthentication.*/PasswordAuthentication yes/g" ${sshd_config} +done sed -i "s/^KbdInteractiveAuthentication.*/KbdInteractiveAuthentication yes/g" /etc/ssh/sshd_config systemctl enable ssh