From cb1d5e4e01778feed4097501a9f57474dcd90678 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Mon, 10 Apr 2023 10:14:26 +0800 Subject: [PATCH] Update rebuild_qcow2.sh --- back/rebuild_qcow2.sh | 1 + 1 file changed, 1 insertion(+) 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 "创建备份..."