關於我嘗試的 SSH 連線出了什麼問題,此偵錯資訊告訴我什麼?

關於我嘗試的 SSH 連線出了什麼問題,此偵錯資訊告訴我什麼?

我正在嘗試使用提供的用戶名和密碼憑證與遠端伺服器建立新連線。我嘗試使用此命令進行連接:

ssh -vv -p {port} {user}@{host}

我得到這個輸出,然後它停止了 3 分鐘:

OpenSSH_5.6p1, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /Users/username/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to {host} [{host}] port {port}.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /Users/username/.ssh/id_rsa type 1
debug1: identity file /Users/username/.ssh/id_rsa-cert type -1
debug1: identity file /Users/username/.ssh/id_dsa type -1
debug1: identity file /Users/username/.ssh/id_dsa-cert type -1
debug1: ssh_exchange_identification: 220 ProFTPD 1.3.3a Server (Debian) [{host}]

然後我得到這個:

debug1: ssh_exchange_identification: 421 Login timeout (300 seconds): closing control connection

ssh_exchange_identification: Connection closed by remote host

它是否嘗試使用公鑰進行連接?如果是這樣,那是來自我的客戶端,還是來自伺服器?

測試這可能來自我的客戶的理論,我嘗試使用此處給出的命令強制進行密碼身份驗證:

ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no user@host

但我使用 -vv 得到相同的輸出,並且它在同一點停止。我從來沒有被要求輸入密碼。

這可能是客戶端問題還是伺服器問題?接下來我可以採取哪些步驟來找出問題?伺服器不是由我管理的 - 當我與伺服器管理員調查問題時,最好知道要詢問什麼。

答案1

ssh_exchange_identification: 220 ProFTPD 1.3.3a Server告訴您 FTP 伺服器(而不是 SSH 伺服器)似乎正在偵聽{port}

相關內容