V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
twor
V2EX  ›  问与答

电信宽带是公网 ip,我映射 8888 到内网某 ubuntu 的 80 端口,公网访问成功;映射其他端口(2222, 8889)到 22(局域网是可以 ssh 的),为什么 ssh 登录不成功呢

  •  
  •   twor · 2018-08-08 17:13:03 +08:00 · 1804 次点击
    这是一个创建于 2080 天前的主题,其中的信息可能已经有所发展或是发生改变。
    3 条回复    2018-08-08 22:32:54 +08:00
    jasonyang9
        1
    jasonyang9  
       2018-08-08 17:34:24 +08:00
    第一反应难道不是看日志么?

    ```
    grep 'sshd' /var/log/auth.log
    ```
    wuyamao
        2
    wuyamao  
       2018-08-08 22:09:35 +08:00
    电信光猫上有 iptables 防火墙,可能过滤了 22 端口,把 ssh 端口改成其他试试
    twor
        3
    twor  
    OP
       2018-08-08 22:32:54 +08:00
    @wuyamao 我把 http 服务关闭,把 sshd 的端口改成 80,路由器上对外的端口改成 8888 (端口设置跟原先可以正常工作的 http 服务一致)

    @jasonyang9
    Aug 8 14:21:15 sshd[6322]: Bad protocol version identification 'GET / HTTP/1.1' from 96.126.x.x port 20014
    Aug 8 14:21:27 sshd[6326]: Did not receive identification string from 96.126.x.x port 20016

    看不懂,回去查查资料
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5287 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:56 · PVG 14:56 · LAX 23:56 · JFK 02:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.