问题1:Xshell连接不上虚拟机
#启动ssh服务 /etc/init.d/ssh start #查看SSH服务22端口是否开启 netstat -antulp | grep ssh
问题2:XShell连接Linux提示ssh服务器拒绝了密码,请再试一次
原因:一般是设置了禁止root远程登录。
vim /etc/ssh/sshd_config
将下列配置
# Authentication: LoginGraceTime 120 PermitRootLogin prohibit-password StrictModes yes
修改为
# Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes
参考:https://blog.csdn.net/fanren224/article/details/70862346