エラーなしでSSH接続設定に時間がかかる問題を解決

エラーなしでSSH接続設定に時間がかかる問題を解決

SSHを介して特定のホスト(Ubuntu Server 14.04で実行)に接続する際に問題があります。このプロセスが発生するまでに最大9秒かかります。デバッグオプション(-v)を使用してsshを実行すると、次の出力が表示されます。

    OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to host_ip [host_ip] port 22.
    debug1: Connection established.
    debug1: identity file /host_home/.ssh/id_rsa type -1
    debug1: identity file /host_home/.ssh/id_rsa-cert type -1
    debug1: identity file /host_home/.ssh/id_dsa type -1
    debug1: identity file /host_home/.ssh/id_dsa-cert type -1
    debug1: identity file /host_home/.ssh/id_ecdsa type -1
    debug1: identity file /host_home/.ssh/id_ecdsa-cert type -1
    debug1: identity file /host_home/.ssh/id_ed25519 type -1
    debug1: identity file /host_home/.ssh/id_ed25519-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.11
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.11
    debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.11 pat OpenSSH_6.6.1* compat 0x04000000
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr [email protected] none
    debug1: kex: client->server aes128-ctr [email protected] none
    debug1: sending SSH2_MSG_KEX_ECDH_INIT
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: ECDSA 2a:cb:66:69:ce:14:94:83:59:d5:4b:ea:87:15:be:23
    debug1: Host 'host_ip' is known and matches the ECDSA host key.
    debug1: Found key in /host_home/.ssh/known_hosts:4
    debug1: ssh_ecdsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
**_____the abnormal delay starts here_____**
    debug1: Authentications that can continue: publickey,password
    debug1: Next authentication method: publickey
    debug1: Trying private key: /host_home/.ssh/id_rsa
    debug1: Trying private key: /host_home/.ssh/id_dsa
    debug1: Trying private key: /host_home/.ssh/id_ecdsa
    debug1: Trying private key: /host_home/.ssh/id_ed25519
    debug1: Next authentication method: password

具体的なエラーや例外は検出されませんでしたが、認証フェーズが長すぎることがわかりました。

これに関連するハードウェア仕様があるかどうか疑問に思います。または、より高度なデバッグモードにすることもできます。

ベストアンサー1

問題が解決しました!

私が知る限り、それは基本的に質問です。ネットワーク構成私の所有者が持っています。ドメイン名システムしかし、その仕事をしなさい地元のネットワーク。ファイルを削除dns-nameserversした後、network/interfacesすべてが正常に戻りました。

誰かがDNS解決プロセスとデバッグモードで実行しても問題が報告されない理由を詳しく説明できることを嬉しく思います。

おすすめ記事