免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3971 | 回复: 11
打印 上一主题 下一主题

ssh Connection reset by peer [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-01 11:37 |只看该作者 |倒序浏览
各位大哥好,新年快乐

今天登录服务器ssh,发现登录不上了,ssh test@10.0.0.4 连接过去后提示输入密码,然后我输入密码(密码绝对没错)
本来正常情况会是登入的,但,今天却立刻被断开了连接,并且提示
ssh mas@10.0.0.4        
test@10.0.0.4's password:
Read from remote host 10.0.0.4: Connection reset by peer


这是什么回事啊,我现在登录不到了远程主机,请问怎么样可以解决吗?

论坛徽章:
0
2 [报告]
发表于 2007-01-02 17:29 |只看该作者
各位兄弟能告诉下我吗?我都好几天不能登陆我们的远程机器了,真要命,又恰好是在元旦期间

论坛徽章:
0
3 [报告]
发表于 2007-01-02 17:31 |只看该作者
ssh -vvv mas@10.0.0.4

如上,把调试信息发上来吧。

论坛徽章:
0
4 [报告]
发表于 2007-01-03 15:35 |只看该作者
ssh -vvv mas@10.0.0.4
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.0.0.4 [10.0.0.4] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.6.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 127/256
debug2: bits set: 1034/2048
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 29
debug1: Host '10.0.0.4' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:29
debug2: bits set: 1020/2048
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-with-mic,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug2: userauth_pubkey_agent: no keys at all
debug2: userauth_pubkey_agent: no more keys
debug2: userauth_pubkey_agent: no message sent
debug1: Trying private key: /root/.ssh/identity
debug3: no such identity: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
mas@10.0.0.4's password:
debug3: packet_send2: adding 48 (len 62 padlen 18 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_free: channel 0: client-session, nchannels 1
debug3: channel_free: status: The following connections are open:\015
                                                                       #0 client-session (t3 r-1 i0/0 o0/0 fd 4/5)\015

debug3: channel_close_fds: channel 0: r 4 w 5 e 6
Connection to 10.0.0.4 closed by remote host.
Connection to 10.0.0.4 closed.
debug1: Transferred: stdin 0, stdout 0, stderr 83 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 3654.3
debug1: Exit status -1

每次都这样,验证过密码后就关闭了
问题出现以前我很长很长一段时间都没有修改过ssh,也没有重启过ssh

不过不久前在/etc/sysctl.conf里面曾经增加过fs.file-max = 65536 后来sysctl -p 生效

我现在都不知道问题是在哪里,似乎又不像是ssh的问题,大哥们帮帮我吧

[ 本帖最后由 lzd7807 于 2007-1-3 15:45 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2007-01-03 15:40 |只看该作者
的确。那在 10.0.0.4 机器上本地登陆可以吗?我觉得可能不是 sshd 的问题。

论坛徽章:
0
6 [报告]
发表于 2007-01-03 16:06 |只看该作者
10.0.0.4主机在远程机房,我现在没有办法去操作,唯一连接途径只有ssh,好像也不像是黑客攻击
大哥根据你的判断,可能会是哪个地方的问题,会是mas这个用户配置的问题吗?和ulimit会不会有关系,我现在可登录的几个用户,包括test帐号,都是这个原因。
因为我仔细想了一下,就只修改了ulimit这个东东。
如果判断不是ssh的问题,那么能影响到这么多用户的,我想也就只有这些参数了 如果不小心ulimit
让ulimit -t 0 会不会出现这样的结果?
和网络连接设置有关系吗?(不过我也很长时间没有修改过了)

论坛徽章:
0
7 [报告]
发表于 2007-01-04 10:01 |只看该作者
还是登录不了,郁闷啊,请各位大哥帮忙啊

论坛徽章:
0
8 [报告]
发表于 2007-01-04 10:33 |只看该作者
fs.file-max是系统优化的,应该没有什么影响,估计是安全性的问题,你看看这片文档,希望对你有帮助
http://www.debian-administration.org/articles/152

论坛徽章:
0
9 [报告]
发表于 2007-01-04 10:52 |只看该作者
不知道重启能不能解决?

论坛徽章:
0
10 [报告]
发表于 2007-01-05 13:46 |只看该作者
我现在到了本机,但是登录也不行,密码输入正确后又马上回到了login状态,这个是什么原因啊?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP