Connecting to 10.0.0.200:22... Could not connect to '10.0.0.200' (port 22): Connection failed.

今天遇到一个关于XShell连接虚拟机中的centos系统的奇葩问题,在连接的时候报错如下:

Connecting to 10.0.0.200:22... Could not connect to '10.0.0.200' (port 22): Connection failed.  Type `help' to learn how to use Xshell prompt.

一开始以为是系统的问题,但是搞了半天,才发现是虚拟机这个软件本身的问题,坑得一比!但是解决方法很简单。就是在编辑菜单打开虚拟网路编辑器。

Connecting to 10.0.0.200:22... Could not connect to '10.0.0.200' (port 22): Connection failed.

点击还原默认设置:

Connecting to 10.0.0.200:22... Could not connect to '10.0.0.200' (port 22): Connection failed.

然后重启虚拟机就可以成功连上了