我在工作场所的计算机上设置了一个 ssh 服务器,这样我就可以远程工作,而且它大部分工作得很好。
但是有时(大约每隔一周一次),ssh 连接在我使用它时会突然停止。发生这种情况时,服务器将永远不会再次接受任何 ssh 连接,直到我手动重新启动它。
编辑:更准确地说,它不会“拒绝”连接,它只会永远卡住
我确信对于这种情况必须有一些解决方法,所以每次发生这种情况时,我都不必亲自站在我的电脑前。你对此有什么建议吗?
这是 ssh 连接失败时的详细输出:
OpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /home/hedi/.ssh/config
debug1: /home/hedi/.ssh/config line 6: Applying options for inubushiPC
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 133.11.35.15 [133.11.35.15] port 22.
debug1: Connection established.
debug1: identity file /home/hedi/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hedi/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10