提示:这只是Xshell连接失败的原因之一
在VMware 15.5中布置Ubuntu 16.4,在Ubuntu中ping宿主机和在宿主机中ping Ubuntu都可以ping通,但是通过Xshell 7进行登录访问仍显示连接失败,如下:
Connecting to 192.168.180.128:22 Could not connect to '192.168.180.128'(port 22): Connection failed. Type 'help' to learn how to use Xshell prompt.
原因分析:
Ubuntu系统没有安装远程连接的服务器端软件openssh-server,所以需要手动安装。
解决方案:
在保证Ubuntu系统能够连接互联网的前提下,安装命令为sudo apt-get install openssh-server;
安装完成后可以通过netstat -tl确认openssh-server已启动。
江春茂. 等. Linux基础教程[M]. 清华大学出版社, 2020, p31.



