mirror of
https://github.com/oneclickvirt/pve.git
synced 2024-09-21 15:35:58 +08:00
Update rebuild_qcow2.sh
This commit is contained in:
parent
acf0fc8b77
commit
e8cfa668c6
|
@ -25,6 +25,8 @@ virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >
|
||||||
echo "启用SSH功能..."
|
echo "启用SSH功能..."
|
||||||
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
||||||
virt-customize -a $qcow_file --run-command "systemctl start ssh"
|
virt-customize -a $qcow_file --run-command "systemctl start ssh"
|
||||||
|
virt-customize -a $qcow_file --run-command "systemctl enable sshd"
|
||||||
|
virt-customize -a $qcow_file --run-command "systemctl start sshd"
|
||||||
echo "启用root登录..."
|
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/#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/#PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config"
|
||||||
|
@ -34,7 +36,9 @@ virt-customize -a $qcow_file --run-command "sed -i 's/#AddressFamily any/Address
|
||||||
virt-customize -a $qcow_file --run-command "sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/g' /etc/ssh/sshd_config"
|
virt-customize -a $qcow_file --run-command "sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/g' /etc/ssh/sshd_config"
|
||||||
virt-customize -a $qcow_file --run-command "sed -i 's/#ListenAddress ::/ListenAddress ::/g' /etc/ssh/sshd_config"
|
virt-customize -a $qcow_file --run-command "sed -i 's/#ListenAddress ::/ListenAddress ::/g' /etc/ssh/sshd_config"
|
||||||
virt-customize -a $qcow_file --run-command "service ssh restart"
|
virt-customize -a $qcow_file --run-command "service ssh restart"
|
||||||
|
virt-customize -a $qcow_file --run-command "service sshd restart"
|
||||||
virt-customize -a $qcow_file --run-command "systemctl restart sshd"
|
virt-customize -a $qcow_file --run-command "systemctl restart sshd"
|
||||||
|
virt-customize -a $qcow_file --run-command "systemctl restart ssh"
|
||||||
echo "创建备份..."
|
echo "创建备份..."
|
||||||
cp $qcow_file ${qcow_file}.bak
|
cp $qcow_file ${qcow_file}.bak
|
||||||
echo "复制新文件..."
|
echo "复制新文件..."
|
||||||
|
|
Loading…
Reference in a new issue