我正在尝试使用 ngrok 连接到我的 Linux 服务器,但是当我尝试连接到 ngrok URL 时它会冻结,有人可以告诉我如何解决这个问题我的 ssh 日志:
ssh -vvv [email protected] -p18650
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "0.tcp.ngrok.io" port 18650
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 0.tcp.ngrok.io [3.19.3.150] port 18650.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/white0wl/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
我在 ngrok 中的 ssh 会话状态显示 opn 1 之后什么也没有发生。
答案1
当 SSH 客户端连接到 SSH 服务器时,通过连接传递的第一个数据是从服务器发送到客户端的版本字符串。ssh
调试消息如下所示:
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9
debug1: match: OpenSSH_7.9 pat OpenSSH* compat 0x04000000
根据您的调试跟踪,您的 ssh 客户端正在连接到某个东西并等待版本字符串。但无论您连接到什么,都不会发送版本字符串。
最简单的解释就是您没有连接到 SSH 服务器。您可能正在连接到 HTTP 服务器或其他服务器。
或者,如果您正在连接到 SSH 服务器,则它在某种程度上出现故障。