查询博客资料:https://blog.csdn.net/u010988850/article/details/49814543
了解到有两种情况:
(1)sshd服务器没有启动;(2)防火墙问题
已查询确认不是防火墙的问题,然后开始查询:ubuntu下sshd状态的查询方法。
查到博客资料:https://www.cnblogs.com/happyliuyi/p/5833887.html
得知方法后先查询状态:ps -e |grep ssh
查询无果后:从--SSH分客户端openssh-client和openssh-server
如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-client),如果要使本机开放SSH服务就需要安装openssh-server
sudo apt-get install openssh-server
中明白需要安装sshd服务器端,执行sudo apt-get install openssh-server
安装成功后,xshell就可以连接了