Debian
ssh_exchange_identification:連接被遠端主機+ HP Procurve關閉
我試圖通過 ssh 從 linux 機器連接到我們的 HP Procurve 交換機,但我收到錯誤消息:“ssh_exchange_identification:連接已被遠端主機關閉。” (也作為根)
我可以毫無問題地通過 ssh 連接到其他 Linux 機器。通過 Windows + Putty 連接到 Switch 也可以。
它是一個標準的 Debian 安裝,沒有任何特定的配置。
我忘了什麼嗎?
-vv 1.0.0.20 OpenSSH_7.4p1 Debian-10+deb9u3, OpenSSL 1.0.2l 25 May 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: resolving "1.0.0.20" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 1.0.0.20 [1.0.0.20] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u3 ssh_exchange_identification: Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host
當 SSH 客戶端與伺服器建立 TCP 連接時,發生的第一個數據交換是伺服器將其版本字元串發送給客戶端。您收到的消息表明伺服器沒有將其版本字元串發送給客戶端,而是關閉了 TCP 連接。
這不是身份驗證失敗。伺服器尚未將其主機密鑰發送給客戶端,並且客戶端尚未嘗試向伺服器進行身份驗證。伺服器剛剛接受了來自客戶端的 TCP 連接,然後將其丟棄。
對此行為的最簡單解釋是伺服器配置為不接受僅來自特定 IP 地址的連接,並且您嘗試從不允許連接到伺服器的系統進行連接。