当我尝试连接到远程服务器,ssh要求密码,检查它(如果我把错误的密码,它会说“权限被拒绝”),但不让我在:
$ ssh user11@123 user11@123's password:
什么也没有发生,一段时间后:
Read from remote host 123: Connection reset by peer
123是隐藏服务器的IP地址。
ssh和sftp都这样做。
远程是Linux + OpenSSH和一周前,ssh工作正常。
在-vvv模式下我input了密码后
debug3: packet_send2: adding 64 (len 58 padlen 6 extra_pad 64) debug2: we sent a password packet, wait for reply debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug1: Entering interactive session.
一段时间后…
debug1: channel 0: free: client-session, nchannels 1 debug3: channel 0: status: The following connections are open: #0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cfd -1) debug3: channel 0: close_fds r 4 w 5 e 6 c -1 Read from remote host 123: Connection reset by peer debug1: Transferred: stdin 0, stdout 0, stderr 63 bytes in 117.1 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.5
这可能有几个不同的原因,这里没有足够的信息来精确地缩小问题的范围。
您必须在/var/log的服务器“123”中检查您的各种日志文件,以查看发生了什么事情。 这意味着如果您无法通过SSH连接,请检查其控制台。
一个(不完整的)可能的原因列表可能是:
/bin/false或者其他东西 rm -rf /你的服务器。 无论哪种方式,你将不得不去服务器的控制台,看看可能会发生什么。