iptables当找到匹配的规则时,就会执行相应的动作,而不会向下继续匹配。
因为ssh端口开放的规则在all规则之后,所以永远都不会匹配到,也就是ssh永远被禁止。

root下执行:
iptables -I INPUT -p tcp --dport 22 -j ACCEPT

即可。

<Linux> Ubuntu error: ssh: connect to host master port 22: No route to host lost connection的更多相关文章

  1. 使用wifi ssh: connect to host hadoop000 port 22: No route to host

    使用的wifi,在wifi下IP会自动分配. 先尝试能否ping通,如果都无法ping通那先把IP配置那些先搞定ping通之后遇到此问题再来尝试解决. 查看  /etc/hosts 中配置的 IP  ...

  2. ubuntu系统ssh遇到port 22:No route to host问题

    ssh遇到这个port 22:No route to host这个问题 检查防火墙状态 (iptables -L) 检查ssh状态 (ps -elf |grep ssh) 检查网络状态(换根网线)

  3. ssh: connect to host master port 22: Connection refused

    hadoop集群启动的时候namenode显示Connection refused 到windows下ping  master 显示传输中过期 ip是静态的 ssh master 也是连接拒绝 重启s ...

  4. ssh遇到port 22:No route to host问题的解决方法

    一 iptables 问题 1.没有安装,可以先安装 yum install iptables 2.防火墙的开启与关闭 即时生效,重启失效 service iptables start(开启) ser ...

  5. Ubuntu下 ssh : connect to host localhost port 22:Connection refused

    Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因 ...

  6. 关于github报错:ssh: connect to host github.com port 22: Connection timed outfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

    当执行git命令如:git clone.git pull等等 出现报错:ssh: connect to host github.com port 22: Connection timed outfat ...

  7. ssh: connect to host localhost port 22: Connection refused

    1.hadoop安装好之后,执行ssh localhost无法执行, 提示“ssh: connect to host localhost port 22: Connection refused”. 2 ...

  8. ssh本机失败(ssh: connect to host localhost port 22: Connection refused)

    ssh本机失败(ssh: connect to host localhost port 22: Connection refused) 一. 问题描述 之前一直在服务上使用宝塔面板, 今天突发奇想, ...

  9. 运行Hadoop start-all.sh遇到的错误ssh: connect to host localhost port 22: Connection refused

    ssh: connect to host localhost port 22: Connection refused 我的情况是ssh server没装,查看方法: ps -e |grep ssh 1 ...

随机推荐

  1. Linux/Centos下安装部署phantomjs 及使用

    PhantomJS 是一个基于 WebKit 的服务器端 JavaScript API.它全面支持web而不需浏览器支持,其快速,原生支持各种Web标准: DOM 处理, CSS 选择器, JSON, ...

  2. 创建virtualenv虚拟环境

    这个部分知识我在之前的随笔里记过笔记. 传送门:http://www.cnblogs.com/0bug/p/8598458.html 本文只演示Windos下virtualenv环境的使用: 首先,确 ...

  3. JAVA常量与变量

    顺着箭头的转换为自动转换逆这箭头的转换为强制转换. 常量 关键字FINAL 命名为大写 标识符 1要以字母数字下划线和¥组成 2首字母不能为数字 3不能是JAVA的关键字和 保留字 4数据类型分为基本 ...

  4. 基于C#的PISDK研究(代码)

    本篇文章主要利用PISDK从PI服务器取数,介绍多种取数方法. 首先需要一些基础的代码,比如获取PI服务的: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...

  5. tomcat整体架构

    1.背景 Tomcat作为JavaWeb领域的Web容器,目前在我们淘宝也使用的也非常广泛,现在基本上所有线上业务系统都是部署在Tomcat上.为了对平时开发的Web系统有更深入的理解以及出于好奇心对 ...

  6. ALGO-145_蓝桥杯_算法训练_4-1打印下述图形

    记: 这里用到了printf("%*s%s%*s\n",n-i,"",arr,n-i,"");的写法, 其中%*s中的*代表该字符串s的个数 ...

  7. 开启Unity3D之旅

    圣典知识目录http://game.ceeger.com/Manual/ NGUI http://www.taikr.com/course/34泰课课程 http://tieba.baidu.com/ ...

  8. 峰Redis学习(1)Redis简介和安装

    是从博客:http://blog.java1234.com/blog/articles/310.html参考过来的: 第一节:Redis 简介 为什么需要NoSQL,主要应对以下问题,传统关系型数据库 ...

  9. jquery zTree异步搜索的例子--搜叶子节点

    参考博客:https://www.cnblogs.com/henuyuxiang/p/6677397.html 前台代码 <%@ page language="java" c ...

  10. 服务容错保护断路器Hystrix之一:入门示例介绍(springcloud引入Hystrix的两种方式)

    限流知识<高可用服务设计之二:Rate limiting 限流与降级> 在微服务架构中,我们将系统拆分成了一个个的服务单元,各单元间通过服务注册与订阅的方式互相依赖.由于每个单元都在不同的 ...