oar*_*ish 22 ssh google-compute-engine google-cloud-platform
我使用谷歌云虚拟机,每隔一段时间我切换回我的终端,看到我的 ssh 会话已经冻结。当我然后尝试重新连接时
ssh -v -i ~/.ssh/key user@host.domain
Run Code Online (Sandbox Code Playgroud)
它显示了这一点:
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/UserName/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug1: Connecting to host.domain [123.456.123.456] port 22.
debug1: Connection established.
debug1: identity file /Users/UserName/.ssh/ke> type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/UserName/.ssh/key-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
Run Code Online (Sandbox Code Playgroud)
所以看起来已经建立了连接,但没有其他任何事情发生,我需要重新启动虚拟机。这是什么意思?
我应该注意,我可以ping毫无问题地托管主机,所以它没有被冻结或任何东西。
Ken*_*ter 21
debug1: Local version string SSH-2.0-OpenSSH_7.4
Run Code Online (Sandbox Code Playgroud)
当客户端连接到 SSH 服务器时,服务器通过向客户端发送纯文本的服务器版本字符串来启动 SSH 协议。使用 OpenSSHssh实用程序,相关的调试行如下所示:
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6
Run Code Online (Sandbox Code Playgroud)
在“本地版本”行之后,您的客户端正在等待服务器将其版本字符串发送到客户端。如果连接在这里挂了,那是因为客户端还没有从服务器收到版本字符串。
一般来说,有几种情况可能会导致这种情况:
在您的情况下,您正在连接到端口 22,因此可以安全地假设您正在连接到 SSH 服务器进程。似乎您遇到了#2(服务器出现故障)的问题,但除此之外无法确切说出问题所在。您需要进入服务器并弄清楚当时发生了什么阻止它处理 SSH 连接。
| 归档时间: |
|
| 查看次数: |
18230 次 |
| 最近记录: |