XShell连接不了(ubunt14.04)虚拟机Could not connect to ‘192.168.1.105’ (port 22): Connection failed

查看sshd是否安装,如果没有,可以安装我最后给出步骤安装ssh服务
sudo ps -e |grep ssh
查看运行状态
sudo apt-get install openssh-server
查看sshd的配置文件中,执行命令vi /etc/ssh/sshd_config打开ssh服务

permitrootlogin yes,说明允许root用户通过ssh进行登陆的。

4.查看ubunt的防火墙状态
sudo ufw status

如上图所示,说明防火墙是关闭的。
关闭ubuntu的防火墙 ufw disable
开启防火墙ufw enable

原文地址:https://www.cnblogs.com/Jayson-yang/p/15098702.html