root@Rx:~# ssh -v root@[ip]
OpenSSH_5.5p1 Debian-6+squeeze1, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to [ip] [ip] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
root@Rx:~#
突然无法连接到我的 VPS,几个小时前它还在运行,而且我也没有做任何异常的事情。最可能的问题是什么?
编辑:我记得我无意中做了sudo chmod -R 777 /var/
。根据第二个答案ssh_exchange_identification:远程主机关闭连接/var/log/btmp 应该是 600,但我的 /var/log 目录中没有 btmp
答案1
我不小心就这样做chmod 777 -R
了/var/
。
通过执行以下操作可以再次连接chmod 755 -R /var/
仍然存在一些异常,因此我必须手动更改模式