mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-15 19:44:38 +08:00
Update rebuild_qcow2.sh
This commit is contained in:
parent
248e46e831
commit
cb1d5e4e01
1 changed files with 1 additions and 0 deletions
|
@ -22,6 +22,7 @@ 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"
|
||||||
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/#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 "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"
|
virt-customize -a $qcow_file --run-command "systemctl restart sshd"
|
||||||
echo "创建备份..."
|
echo "创建备份..."
|
||||||
|
|
Loading…
Reference in a new issue