服务器22端口连接超时 ssh: connect to host *** port 22: Operation timed out
最近酸酸乳出问题,连接v社服务器发现碰到
ssh: connect to host master port 22: Connection timed out
的问题。现在对该问题做一下可能出现的问题
的总结和解决办法:
一.IP配置错误。
当出现上述错误时,首先检查网络连通情况,Ping一下远程登录的目标主机,如果ping不通,很有可能
是/etc/hosts文件中的IP地址映射出现问题,需要仔细检查名称和IP地址的映射关系。
二.防火墙问题。
当发现IP配置没有错误时,我们需要检查端口是否被防火墙禁用了,使用
sudo service iptables status
命令查看防火墙状态,如果出现:
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 DROP tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
2 DROP tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
3 DROP tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
我们可以看到,ssh登陆的默认端口22被禁止了。
我们使用
sudo chkconfig iptables off
来永久关闭防火墙,如果使用
sudo service iptables stop
将临时关闭防火墙,会在下一次关机重启后重置,建议使用第一种。
实在不行试试这个:
vi /etc/ssh/sshd_config: 两项注释号掉 Port 22 Protocol 2
如果真的不行那恭喜你,你的服务器被qiang了
服务器22端口连接超时 ssh: connect to host *** port 22: Operation timed out的更多相关文章
- ssh: connect to host port 22: Connection refused
配置Linux的互信,互信完成后,连接需要+端口才可以已经将端口修改为7777,但依旧走的是默认的22端口修改方式:[root@yoon ssh]# vi /etc/servicesssh ...
- github默认端口22被占用,ssh: connect to host github.com port 22: Connection timed out
出现github 连接错误: ssh:connect to host github.com port 22:Connection timed out 刚开始以为是网络问题,github不能连接上,但是 ...
- ssh: connect to host github.com port 22: Connection timed out
问题描述 $ git clone git@github.com:MaugerWu/MaugerWu.github.io.git Cloning into 'MaugerWu.github.io'... ...
- Github拉取远端的时候提示“ssh: connect to host github.com port 22: Connection timed out”错误
在使用Github的时候,如果使用到拉取远端分支的时候或者测试ssh -T git@github.com的时候可能会出现连接失败的问题,错误描述为“ssh: connect to host githu ...
- 阿里云配置通用服务的坑 ssh: connect to host 47.103.101.102 port 22: Connection refused
1.~ wjw$ ssh root@47.103.101.102 ssh: connect to host 47.103.101.102 port 22: Connection refused ssh ...
- ssh: connect to host github.com port 22: Connection refused
假设git例如,下面的问题时,远程推送: [fulinux@ubuntu learngit]$ git push -u origin master ssh: connect to host githu ...
- Linux(例如CentOS 7)打开TCP 22端口,基于SSH协议
SSH 为 Secure Shell 的缩写,由 IETF 的网络工作小组(Network Working Group)所制定:SSH 为建立在应用层和传输层基础上的安全协议.SSH 是目前较可靠,专 ...
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
1. 异常 在连接github时,执行"ssh -T git@github.com" 命令时,出现 ssh: connect to host github.com port 22: ...
- ssh本机失败(ssh: connect to host localhost port 22: Connection refused)
ssh本机失败(ssh: connect to host localhost port 22: Connection refused) 一. 问题描述 之前一直在服务上使用宝塔面板, 今天突发奇想, ...
随机推荐
- R语言之多重共线性的判别以及解决方法
多重共线性(Multicollinearity)是指线性回归模型中的解释变量之间由于存在精确相关关系或高度相关关系而使模型估计失真或难以估计准确. 1.可以计算X矩阵的秩qr(X)$rank,如果 ...
- 模块讲解----time与date time(时间模块)
time和datetime 在python中,通常有一下几种方式来表示时间:1.时间戳:2.格式化时间字符串:3.元祖(struct_time):其中元祖(struct_time分为九个元素) UTC ...
- 基于.net core2.1开发遇到的问题记录以及解决方案
问题1:升级EFCore 到2.1一直报'Void Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFac ...
- Selenium之使用PageFactory初始化pageobject
使用PageFactory初始化pageobject有什么作用呢,下面举个例子来说明 public BaiduPage baiduPage = PageFactory.initElements(dri ...
- Delphi APP 開發入門(四)簡易手電筒
Delphi APP 開發入門(四)簡易手電筒 分享: Share on facebookShare on twitterShare on google_plusone_share 閲讀次數:32 ...
- fir.im 测试包下载工具--FIRReader 的图文介绍
fir.im 是一个供开发者上传测试包(也可以是企业的正式包)的网站.该网站提供了接口访问应用资源.下面要介绍的这个应用对接了这些接口,供用户方便下载应用. 先来看下应用截图吧! 主要有以下功能点:1 ...
- springCloud3---ribbon
同一份代码,改变端口,就可以启动多个同名但是端口不一样的微服务. 客户端通过nginx来调用后面的多个用户微服务来实现负载均衡,这是服务端负载均衡. 客户端有一个组件,可以知道当前有几个用户微服务的i ...
- Selenium+Python常见定位方法
参见官网:http://selenium-python.readthedocs.io/locating-elements.html 有多种策略来定位页面中的元素.你可以使用最适合你的情况.Seleni ...
- 【VS2015】未能创建 Visual C# 2015编译器
今天在安装完成Visual Studio 2015后,在执行update 3时出错,导致再次打开VS2015时提示错误:“未能创建 Visual C# 2015编译器”和“未能正确加载CSharpPa ...
- Python面试题之Python中的lambda map filter reduce zip
当年龟叔想把上面列出来的这些都干掉.在 “All Things Pythonic: The fate of reduce() in Python 3000”这篇文章中,他给出了自己要移除lambda. ...