SSH 永远挂起?

SSH 永远挂起?

我尝试通过 SSH 连接到远程虚拟机,但该命令永远挂起。

之前,当我试图在上面设置一些东西时,我编辑了 /etc/hosts 和 /etc/init.d,我担心我可能搞砸了一些东西。如果不是很明显,那么我对网络/服务器管理方面有点陌生。

使用 -v 运行给我这个:

ssh USERNAME@IP -vvv
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.150.42.39 [10.150.42.39] port 22.
debug1: Connection established.
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa-cert type -1
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/LOCALUSERNAME/.ssh/id_dsa" as a RSA1 public key
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa type 2
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa-cert type -1

编辑:我尝试将 id_dsa 和 id_dsa.pub 文件移走并收到以下消息:

ssh USERNAME@IP -vvv
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.150.42.39 [10.150.42.39] port 22.
debug1: Connection established.
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa-cert type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa type 1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa-cert type -1

EDIT2:如果其他人遇到这个问题:显然我的虚拟机内存不足并挂起。我的系统管理员重新启动了它并修复了它。

答案1

事实证明,由于不相关(并且仍然有点神秘)的原因,机器不断耗尽内存。重新启动它暂时修复了它,但很快就会再次耗尽。我最终把虚拟机搞砸了,换了一个新的。

相关内容