linux ssh无法连接。连接上的没问题。

ssh-v192.168.0.145OpenSSH_3.6.1p2,SSHprotocols1.5/2.0,OpenSSL0x0090701fdebug1:Reading... ssh -v 192.168.0.145
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.
debug1: Connecting to 192.168.0.145 [192.168.0.145] port 22.
debug1: Connection established.
debug1: identity file /home/admins/aria/.ssh/identity type -1
debug1: identity file /home/admins/aria/.ssh/id_rsa type -1
debug1: identity file /home/admins/aria/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 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
debug1: kex: server->client aes128-cbc hmac-md5 none
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
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.0.145' is known and matches the RSA host key.
debug1: Found key in /home/admins/aria/.ssh/known_hosts:5
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/admins/aria/.ssh/identity
debug1: Trying private key: /home/admins/aria/.ssh/id_rsa
debug1: Trying private key: /home/admins/aria/.ssh/id_dsa
debug1: Next authentication method: password
aria@192.168.0.145's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
aria@192.168.0.145's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: channel_free: channel 0: client-session, nchannels 1
Read from remote host 192.168.0.145: Connection reset by peer
Connection to 192.168.0.145 closed.
debug1: Transferred: stdin 0, stdout 0, stderr 100 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 16241.8
debug1: Exit status -1
Accepted password for aria from 1.1.1.1 port 63477 ssh2
pam_unix(sshd:session): session opened for user aria by (uid=0)
fatal: setresuid 500: Resource temporarily unavailable
pam_unix(sshd:session): session closed for user aria
展开
 我来答
匿名用户
2012-06-25
展开全部
1、搜一下:ssh Read from remote host Connection reset by peer
2、SSH有一个 ClientAliveInterval 参数,在你的 /etc/ssh/sshd_config 配置文件中设置一个合适的值,比如:ClientAliveInterval 115 就可以让 OpenSSH 服务器端在空闲的时候定时向客户端请求一个数据包。
ISP或网关在使用NAT时,有时NAT设备会检测建立的session,如果无数据传输,就会拆掉该session,体现在ssh登录时,就会出现没有操作时无缘无故的断线。在NAT转换时,默认无传输session存活周期为120秒,把ClientAliveInterval值设成了115秒,这样就解决了SSH容易掉的问题!
Storm代理
2023-07-25 广告
StormProxies是一家国内优质海外HTTP代理商,拥有一个庞大的IP资源池,覆盖200多个地区,IP数量大且匿名度高。其优点还包括超高并发、稳定高效、技术服务等特点,同时提供HTTP、HTTPS以及SOCKS5协议支持。此外,Sto... 点击进入详情页
本回答由Storm代理提供
shyokou
推荐于2017-12-16 · TA获得超过677个赞
知道小有建树答主
回答量:382
采纳率:0%
帮助的人:288万
展开全部
貌似 "Read from remote host 192.168.0.145: Connection reset by peer" 表明服务端的 sshd 在 respawn 的时候资源不够而退出了, 所以需要检查一下服务端的 sshd 日志看看咋了 ...
追问
fatal: setresuid 500: Resource temporarily unavailable

这个大概会是什么原因引起的?
追答
恰如 "chassisd | 十级" 所言, "fatal: setresuid 500: Resource temporarily unavailable" 就是表明需要调用的资源暂时不够了, 是达到了与 nproc 有关的软设置上限, 适当配置 limits.conf 里的 nproc 数值即可 ...
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
chassisd
2012-06-25 · TA获得超过4115个赞
知道大有可为答主
回答量:4004
采纳率:76%
帮助的人:2982万
展开全部
看看你/etc/security/limits.conf里是否有用户数的限制。比如下面的:
* soft nproc 100
* hard nproc 150
到了100个用户,就会报下面的错:
sshd[21872]: Accepted password for user from 192.168.1.1 port 56193 ssh2
sshd[21875]: fatal: setresuid 500: Resource temporarily unavailable
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式