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

DO 的 SSH 无法连接

  •  
  •   PotatoBrother · 2014-06-13 19:56:47 +08:00 · 5067 次点击
    这是一个创建于 3805 天前的主题,其中的信息可能已经有所发展或是发生改变。
    前段时间 SSH 一直用的好好的,突然就连不上了,于是加 -v 看了下输出:

    OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
    debug1: Reading configuration data /etc/ssh_config
    debug1: /etc/ssh_config line 20: Applying options for *
    debug1: Connecting to 107.170.199.131 [107.170.199.131] port 22.
    debug1: Connection established.
    debug1: identity file /Users/JmPotato/.ssh/id_rsa type 1
    debug1: identity file /Users/JmPotato/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/JmPotato/.ssh/id_dsa type -1
    debug1: identity file /Users/JmPotato/.ssh/id_dsa-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.2
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u1
    debug1: match: OpenSSH_6.0p1 Debian-4+deb7u1 pat OpenSSH*
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug1: kex: client->server aes128-ctr hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Server host key: RSA 21:34:2e:e7:47:1c:cd:29:b7:23:6c:26:7a:af:15:a6
    debug1: Host '107.170.199.131' is known and matches the RSA host key.
    debug1: Found key in /Users/JmPotato/.ssh/known_hosts:1
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password
    debug1: Next authentication method: publickey
    debug1: Offering RSA public key: /Users/JmPotato/.ssh/id_rsa
    debug1: Server accepts key: pkalg ssh-rsa blen 279
    debug1: read PEM private key done: type RSA
    debug1: Authentication succeeded (publickey).
    Authenticated to 107.170.199.131 ([107.170.199.131]:22).
    debug1: channel 0: new [client-session]
    debug1: Requesting [email protected]
    debug1: Entering interactive session.
    debug1: Sending environment.
    debug1: Sending env LANG = zh_CN.UTF-8
    Write failed: Broken pipe

    Google 了一圈回来各种方法都试了,没用。
    ping 是可以 ping 通,但就是 SSH 连接不能。
    各位 V 友有遇到过吗?
    第 1 条附言  ·  2014-06-13 21:49:43 +08:00
    刚才排查了一下,发现貌似跟路由器有关系,我连了邻居家的 WiFi 就可以正常连上 SSH,而自家的则不行。
    我的路由器型号是 WNDRMAC 刷了 OpenWrt,会不会是路由器某处配置的原因?

    cc@halczy
    第 2 条附言  ·  2014-06-13 22:24:34 +08:00
    貌似是设置了多拨的原因......
    7 条回复    2014-06-13 22:45:14 +08:00
    halczy
        1
    halczy  
       2014-06-13 20:04:04 +08:00
    SSH是用22端口吗? 不用22端口可能被干扰.

    可以在DO临时建一台新的VPS做跳板, 用完删掉.
    PotatoBrother
        2
    PotatoBrother  
    OP
       2014-06-13 20:08:23 +08:00
    @halczy 是用的22端口
    halczy
        3
    halczy  
       2014-06-13 20:14:02 +08:00
    其他SSH能用吗? 还是只是这台建立不了链接?
    PotatoBrother
        4
    PotatoBrother  
    OP
       2014-06-13 21:50:03 +08:00
    @halczy 见主楼附加内容
    Tinet
        5
    Tinet  
       2014-06-13 22:27:35 +08:00
    楼主是否能解释下为什么设置了多拨就连不上SSH
    PotatoBrother
        6
    PotatoBrother  
    OP
       2014-06-13 22:33:42 +08:00
    @Tinet 目前还不清楚,我暂时取消多拨的设置后 SSH 变得正常了......
    20150517
        7
    20150517  
       2014-06-13 22:45:14 +08:00
    你v的不够,-vvv 看看
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1034 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:18 · PVG 04:18 · LAX 12:18 · JFK 15:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.