xshell连接服务器报错Could not connect to '47.105.32.97' (port 22): Connection failed.

 用xshell无法访问,登录的阿里云控制台,使用远程登录操作的.一看,没有开放22端口.ssh服务也没有.

排错:[无非这三点原因]
1.查法看配置文件

系统ubuntu,遇到的问题是root不能ssh,要改一个什么文件修改 /etc/ssh/sshd_config

注释掉 #PermitRootLogin without-password,添加 PermitRootLogin ye# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes

重启 ssh  服务

root@ubuntu14:~# sudo service ssh restart
ssh stop/waiting
ssh start/running, process 1499

2.以及ssh服务开没开启

参考此文章:http://blog.51cto.com/5250070/1656204

                   https://www.cnblogs.com/jukaiit/p/8994448.html

3.防火墙有没有开通22端口

参考此文章:http://www.cnblogs.com/Leo_wl/p/4385381.html

4.未安装ssh-server服务器

命令:

yum install openssh-server

 

Logo

更多推荐