用Xshell root连接时linux时提示ssh服务器拒绝了密码,应该sshd设置了不允许root用户用密码远程登录 修改 /etc/ssh/sshd_config文件,注意,安装了openssh才会有这个文件,如果文件不存在请检查是否安装了openssh。
vim /etc/ssh/sshd_config
1
1
找到
# Authentication:
LoginGraceTime
120
PermitRootLogin prohibit-password
StrictModes yes
12345
12345
改成
LoginGraceTime
120
PermitRootLogin
yes
StrictModes
yes
1234
1234
然后输入命令
/etc/init
.d/ssh restart
1
1
重启ssh服务即可。
转载自:http://blog.csdn.net/u013366098/article/details/50542517
还有几种情况:
1.sshd服务没有打开
2.防火墙阻止了22端口
3.虚拟机网络设置有问题,比如,你系统配置了和主机同一网段下的静态ip,但是虚拟机网络设置是nat模式
解决办法:把虚拟机网络模式改成桥接模式
转载于:https://www.cnblogs.com/fanren224/p/8457257.html