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. 关于AXI_Quad_SPI的寄存器配置

    关于AXI_Quad_SPI的寄存器配置 1.核初始化配置 首先是: 40:0000_000A 1C:8000_0000 28:0000_0004 2.命令与dummy_data 60:000001E ...

  2. Python依赖打包发布详细

    http://www.cnblogs.com/mywolrd/p/4756005.html 将Python脚本打包成可执行文件   Python是一个脚本语言,被解释器解释执行.它的发布方式: .py ...

  3. ionic popup 做法及样式修改

    ionic popup的做法很简单,一共有三种:show.confirm和alert,官网上讲得很详细. 一.confirm: js:var confirmPopup = $ionicPopup.co ...

  4. WPF Demo18 路由事件

    using System.Windows; namespace 路由事件2 { public class Student { ////声明并定义路由事件 //public static readonl ...

  5. 在linux下使用am335x的DMA

    [本文首发于cnblogs,作者:byeyear,Email:east3@163.com] 这几天在弄am3358的DMA,简化应用环境如下: am3358的FSMC接了一片FPGA: FPGA上接A ...

  6. SET FMTONLY ON

    有时候在执行SQL查询语句时,仅仅需要知道检索的元数据,而不是具体的数据行,可以设置SET FMTONLY ON. SET FMTONLY只将元数据返回给客户端. 语法SET FMTONLY { ON ...

  7. 【Graphite】使用dropwizard.metrics向Graphite中写入指标项数据

    graphite 定时向Graphite中写入指标项数据,指标项模拟个数3000个 使用的类库 官方文档   dropwizard的github地址 Metric官方文档 metrics.dropwi ...

  8. 廖雪峰Java1-4数组操作-1遍历数组

    1.遍历数组 for循环通过下标遍历数组 for each直接遍历数组所有元素 int[] ns1 = {1, 34, 9, 16, 25}; for(int i = 0;i<ns1.lengt ...

  9. Oracle 小技巧

    Oracle小技巧 ###add at 18-10-11 1  ed 在sqlplus当中 如果前一条语句输入有误的话 可以输入ed再回车.在进行编辑 输入ed后有弹窗,可以对之前的输入语句进行编辑 ...

  10. [UE4]传送门:场景切换