报什么错?
提供2个思路,我最近遇到过的。
1,debian系(apt-get)默认拒绝root用户ssh连接。
这种情况:
vi /etc/ssh/sshd_config
将:
PermitRootLogin without-password
改为:
PermitRootLogin yes
然后重启ssh服务:
service ssh restart
2,特殊情况,能ping通,别处也都正常,但就是不能ssh
先将网络改为nat模式,然后重启虚拟机(reboot)。
再把网络改为桥接,重启虚拟机,查看ip(ip -a),再次通过ssh连接即可解决。
(vmware 有时候抽风,偶尔会遇到这种情况,原因未知)