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. RTTI D7

    RTTI需要引用单元TypeInfo 至于RTTI的数据结构,大家可以参考TypeInfo单元的代码 看例子,先为大家介绍一下根据字符串找到属性,并且对其修改的例子 根据属性字符串找到属性,并修改属性 ...

  2. 用DDE控制Word

    DDE(Dynamic Data Exchange),称为动态数据交换.用于进程间的通讯,看看他如何来和Word交互. 在System页签下有TDdeClientConv组件,拖一个放到界面上,然后我 ...

  3. InfluxDB 常用命令

    查表: http://192.168.0.200:8086/query?q=select+*+from+telegraf..cpu http://192.168.0.200:8086/query?q= ...

  4. win10和ubuntu16.04双系统时间同步

    在win10安装了ubuntu双系统,发现在两个系统见时间相差8个小时,这是由于windows和和ubuntu对于从主板取得时间后的处理方式不同,如果你把位置设为上海,ubuntu总是把主板时间当作u ...

  5. python写xml及几个问题

    python写xml的库和用法 几个问题: 1.乱码问题 设写入UTF-8编码 write函数增加encoding='utf-8' 2.空元素xml节点简写及完整写 write函数增加 short_e ...

  6. Eclipse安装Markdown插件

    Markdown Editor 安装Markdown插件可以实现 .md 和 .txt 文件的 Markdown 语法高亮,并提供 HTML 预览. 因为之前没有安装过别的插件,eclipse上安装插 ...

  7. Ubuntu 14.10 下安装Spark

    Spark 是一种与 Hadoop 相似的开源集群计算环境,不过最近非常火.下面介绍安装步骤. 1 安装scala 1.1 我选用的是2.11.4,下载地址http://www.scala-lang. ...

  8. bzoj4398: 福慧双修

    正边权无向图,一条边两个方向权值不一定相同,求经过点1的最小简单环 简单环包含了点1的一条出边和一条入边,且这两条边不同,因此可以枚举这两条边的编号的二进制表示中哪一位不同,用最短路求此时的最优解,时 ...

  9. 使用python操作word

    有两种方式: 使用win32com 使用docx 1.使用win32com扩展包 只对windows平台有效 代码: # coding=utf-8 import win32com from win32 ...

  10. 廖雪峰Java4反射与范型-3范型-1什么是泛型

    1.为什么需要泛型? JDK提供了ArrayList,可以看作"可变长度"的数组: 比数组使用方便 示例1:如果使用ArrayList存储String类型: 需要强制转型 不方便, ...