Skip to content

Commit

Permalink
fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Sep 3, 2024
1 parent 1f1c819 commit ac6ea70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ac6ea70

Please sign in to comment.