1.登录vagrant

2.vi /etc/ssh/sshd_config

vagrant开启Xshell使用密码登录方式_vagrant

3.把PermitRootLogin yes前面的"#"去掉

4.把PasswordAuthentication yes前面的"#"去掉

vagrant开启Xshell使用密码登录方式_运维_02

5.重启sshd

systemctl restart sshd(或者service sshd restart)

vagrant开启Xshell使用密码登录方式_vagrant_03