Guestfish 修改 Centos Qcow2镜像 使其可以SSH ROOT登录
guestfish --rw -a CentOS-7-x86_64-GenericCloud-1907.qcow2
> run
> list-filesystems
> mount /dev/sda1 /
> vi /etc/cloud/cloud.cfg
> vi /etc/ssh/sshd_config
> vi /etc/shadow
> quit
vi /etc/cloud/cloud.cfg
// 4,5行
disable_root:0 //允许root登陆
ssh_pwauth: 1 //ssh开启密码登陆
// 57行
lockpasswd: false
plain_text_passwd: "123456" //添加