From ac6ea707cf6fa737e3bed9598a3483b0b3f67fae Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Tue, 3 Sep 2024 09:24:16 +0000 Subject: [PATCH] fix 2 --- systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh b/systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh index 6a37f0dbaee3..a92254bc8fa3 100755 --- a/systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh +++ b/systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh @@ -30,6 +30,8 @@ setup_sharedfsvm() { sed -i 's/3922/22/g' /etc/ssh/sshd_config systemctl restart ssh + sed -i '/- ssh$/s/- ssh/- [ssh, always]/' /etc/cloud/cloud.cfg + # Prevent root login > /root/.ssh/authorized_keys > /home/debian/.ssh/authorized_keys @@ -52,9 +54,10 @@ setup_sharedfsvm() { rm -f /etc/logrotate.d/cloud + rm -f /etc/cloud/cloud-init.disabled + log_it "Starting cloud-init services" if [ -f /home/cloud/success ]; then - cloud-init clean cloud-init init systemctl stop cloud-init cloud-config cloud-final systemctl disable cloud-init cloud-config cloud-final