诊断 SSH 连接问题

诊断 SSH 连接问题

因此,我们最近对我们的一个服务器网络进行了一些 IT 重组。我通常能够通过 SSH 连接到该机器,但通常在很短的时间内(< 1 分钟)SSH 连接就会断开,并显示以下错误消息:

Write failed: Connection reset by peer

有时我的 SSH 命令也会被直接拒绝:

ssh: connect to host myserver.com port 22: Connection refused

这使得服务器管理变得非常棘手。不幸的是,我不太精通 IT,因此我不知道如何找出问题的原因。我查看了机器上的 SSH 连接设置,它们似乎正常。

我该如何追踪该问题?

详细输出:

连接失败:

ssh -v [email protected]
OpenSSH_6.2p2, OpenSSL 1.0.1e 11 Feb 2013
debug1: Connecting to myserver.com [ip.ip.ip.ip] port 22.
debug1: connect to address ip.ip.ip.ip port 22: Connection timed out
ssh: connect to host myserver.com port 22: Connection timed out

连接断开:

首次连接时会打印出大量信息,但当连接断开时,仅打印出以下信息:

Write failed: Connection reset by peer

相关内容