From 4b16fa3e0db0d068b07a893936a5bcfb704e0ae0 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 1 Aug 2023 23:39:37 +0800 Subject: [PATCH] Update rebuild_qcow2.sh --- back/rebuild_qcow2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/rebuild_qcow2.sh b/back/rebuild_qcow2.sh index 9a06be9..2a8ea80 100644 --- a/back/rebuild_qcow2.sh +++ b/back/rebuild_qcow2.sh @@ -53,7 +53,7 @@ elif [[ "$qcow_file" == *"alpine"* ]]; then echo "启用root登录..." virt-customize -a $qcow_file --edit '/etc/cloud/cloud.cfg:s/preserve_hostname: *false/preserve_hostname: true/' virt-customize -a $qcow_file --edit '/etc/cloud/cloud.cfg:s/disable_root: *true/disable_root: false/' - virt-customize -a $qcow_file --edit '/etc/ssh/sshd_config:s/^#\?PasswordAuthentication.*/PasswordAuthentication yes/' + virt-customize -a $qcow_file --edit '/etc/ssh/sshd_config:s/PasswordAuthentication no/PasswordAuthentication yes/' virt-customize -a $qcow_file --edit '/etc/ssh/sshd_config:s/^#?\(Port\).*/\1 22/' virt-customize -a $qcow_file --edit '/etc/ssh/sshd_config:s/^#PermitRootLogin\|PermitRootLogin/c PermitRootLogin yes/' virt-customize -a $qcow_file --edit '/etc/ssh/sshd_config:s/^#AddressFamily\|AddressFamily/c AddressFamily any/'