diff --git a/back/rebuild_qcow2.sh b/back/rebuild_qcow2.sh index 0cf92dd..0a9fdc8 100644 --- a/back/rebuild_qcow2.sh +++ b/back/rebuild_qcow2.sh @@ -22,6 +22,7 @@ virt-customize -a $qcow_file --run-command "systemctl enable ssh" virt-customize -a $qcow_file --run-command "systemctl start ssh" echo "启用root登录..." virt-customize -a $qcow_file --run-command "sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config" +virt-customize -a $qcow_file --run-command "sed -i 's/#PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config" virt-customize -a $qcow_file --run-command "sed -i 's/#Port 22/Port 22/g; s/#AddressFamily any/AddressFamily any/g; s/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/g; s/#ListenAddress ::/ListenAddress ::/g' /etc/ssh/sshd_config" virt-customize -a $qcow_file --run-command "systemctl restart sshd" echo "创建备份..."