twor
V2EX  ›  问与答

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

  •  
  •   twor · Aug 8, 2018 · 2463 views
    This topic created in 2881 days ago, the information mentioned may be changed or developed.
    3 replies    2018-08-08 22:32:54 +08:00
    jasonyang9
        1
    jasonyang9  
       Aug 8, 2018
    第一反应难道不是看日志么?

    ```
    grep 'sshd' /var/log/auth.log
    ```
    wuyamao
        2
    wuyamao  
       Aug 8, 2018
    电信光猫上有 iptables 防火墙,可能过滤了 22 端口,把 ssh 端口改成其他试试
    twor
        3
    twor  
    OP
       Aug 8, 2018
    @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

    看不懂,回去查查资料
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6122 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 03:25 · PVG 11:25 · LAX 20:25 · JFK 23:25
    ♥ Do have faith in what you're doing.