ssh远程报错ssh_exchange_identification: read: Connection reset by peer

ssh远程登录报错:

[[email protected] ~]$ ssh     198.44.241.34

ssh_exchange_identification: read: Connection reset by peer

初步原因锁定:

1-服务器防火墙限定,

2-是否达到ssh的最大连接数,超过之后会服务器端会拒绝新的连接,直到有新的连接释放出来

3-/etc/hosts.allow和/etc/hosts.deny配置文件限定ip登录

解决方案:

1 firewall-cmd --list-all-zones

查看pubilic.xml和ssh.xml两个防火墙配置文件,是否放通指定ip

2 w 查看当天ssh远程连接数,是否达到最大连接数

#vim /etc/ssh/sshd_config

#LoginGraceTime 2m    参数表示登录验证时间

#MaxAuthTries 6    最大验证重试次数

#MaxSessions 10    最大远程连接数

3 vim /etc/hosts.all和vim /etc/hosts.deny查看限定的ip

[[email protected] ssh]# cat /etc/hosts.allow

#

# hosts.allowThis file contains access rules which are used to

#allow or deny connections to network services that

#either use the tcp_wrappers library or that have been

#started through a tcp_wrappers-enabled xinetd.

#

#See ‘man 5 hosts_options‘ and ‘man 5 hosts_access‘

#for information on rule syntax.

#See ‘man tcpd‘ for information on tcp_wrappers

sshd:122.10.70.66


4 查看ssh用户登录日志/var/log/secure

tail -20 /var/log/secure

or

#less /var/log/messages    查看最近系统操作信息

or

#last    查看最近登录日志

扩展:Linux命令之远程登录/无密码登录-ssh,ssh-keygen,ssh-copy-id

http://www.it165.net/os/html/201402/7315.html

时间: 2024-10-17 05:26:43

ssh远程报错ssh_exchange_identification: read: Connection reset by peer的相关文章

[未解决]报错:ssh_exchange_identification: read: Connection reset by peer

报错代码: ssh_exchange_identification: read: Connection reset by peer fatal: 无法读取远程仓库. 请确认您有正确的访问权限并且仓库存在. FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html 原文地址:https://www.cnblogs.com/hankleo/p/119

apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))

apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104)) 今天用apache 自带的ab工具测试,当并发量达到1000多的时候报错如下: [[email protected]~]# This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech

ssh_exchange_identification: read: Connection reset by peer 报错解决办法

当你登录一台linux机器,登录不了,出现Connection reset by peer 报错,请参照以下解决步骤: 1.ssh -vvv -p22  123.10.98.22 如: localhost:~$ ssh -vvv -p22 123.10.98.22 OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config

ssh_exchange_identification: read: Connection reset by peer

连接SSH报错:ssh_exchange_identification: read: Connection reset by peer 查看没有使用防火墙,怀疑是在hosts.deny中设置了拦截 果不其然 将这一行注释,默念三声“信春哥得永生”后,问题恢复了,so easy

【原创】Apache ab测试时出现:apr_socket_recv &quot;connection reset by peer&quot; 104

今天在用Apache自带的ab工具做以下简单的压测,本来是随便填几个参数,发现ab在1000并发以上报错:apr_socket_recv "connection reset by peer" 104 我用的是当前最新版本编译的,Apache 2.4.23 出了这样的问题,作为小白的我直接谷歌,然后百度,找到的都是一些看起来好高大上的答案,但是我并没有实验成功. 其中有一个是修改源代码的,通过这个答案的启发,我发现根本不用修改任何代码或者被测webserver的系统配置(这里仅针对ab出

CentOS7使用ssh不能登录,报错:Read from socket failed: Connection reset by peer

使用xshell登录CentOS7,不能登录,使用另外一台Linux主机,telent 22端口是同的,ssh连接报以下错误: Read from socket failed: Connection reset by peer 查看不能登录主机的日志 # cat /var/log/messages Dec 15 19:38:27 localhost dbus-daemon: dbus[874]: [system] Successfully activated service 'org.freed

ab压力测试报错: apr_socket_recv: Connection reset by peer (104)

使用ab对网站进行压力测试,开始设置并发500,可以正常使用,当设置并发为1000,则报错: apr_socket_recv: Connection reset by peer (104) 改服务端apache的maxclients参数,调大最大打开文件数,都不解决问题,最后才发现是因为ab的源码对ab的并发有限制,修改源码重新编译apache: 修改源码support目录下的ab.c文件,大概在1369行,修改为: return;} else {//apr_err("apr_socket_re

CentOS7 yum的一次报错&quot; 14: curl#56 - &quot;Recv failure: Connection reset by peer&quot; &quot;

1.故障现象 [[email protected] src]# yum update Loaded plugins: fastestmirror, langpacks Could not retrieve mirrorlist   7&arch=x86_64&repo=os&infra=stock error was 14: curl#56 - "Recv failure: Connection reset by peer" One of the configu

uWSGI uwsgi_response_write_body_do(): Connection reset by peer 报错的解决方法

服务器架构是:Nginx+uWSGI+Django 某一天,发现服务器返回的response不完整,例如文档大小是200K的,但是只返回了100K给浏览器. 查了一下uWSGI的日志,发现以下错误: Mon May 16 18:01:02 2016 - uwsgi_response_write_body_do(): Connection reset by peer [core/writer.c line 322] during GET /access?gid=5&action=edit&r