ssh问题:ssh_exchange_identification: Connection closed by remote host
ssh问题:ssh_exchange_identification: Connection closed by remote host...
刚刚一个朋友告诉我SSH连接不上服务器了,重启电脑也不管用.我仔细看了一下,老报如下错误:
ssh_exchange_identification: Connection closed by remote host
the connection to the remote host was lost . this usually means that you network connection went down or that the remote host was rebooted most network outages are short. and thus trying again may work
(1) 最简单的解决方法就是让/etc/hosts.allow 和/etc/hosts.deny里面的所有信息都不生效,全部注销掉,重启SSH服务就可以了.
但是,有时候在你修改后不久,仍然会出现/etc/hosts.deny自动修改,让你还是登录不了,此时需要检查denyhosts服务。
在redhat系列的版本中,有一个denyhosts服务,会自动覆盖/etc/hosts.deny文件,在确认要登录的机器没有问题时,可以简单做如下处理:
/etc/init.d/denyhosts stop
vim /etc/hosts.allow文件,加入 sshd:ALL。
(2) 但是还有一种情况,就是客户端连接数过多时,也会报这个错误。缺省情况下,SSH终端连接数最大为10个。在这种情况下,需要改SSH的配置文件,
解决方案:
1) 修改/etc/ssh/sshd_config中#MaxStartups 10,将其改为MaxStartups 1000
2) 重启SSH服务,/etc/init.d/ssh restart
ssh问题:ssh_exchange_identification: Connection closed by remote host的更多相关文章
- 【Ansible】SSH Error: ssh_exchange_identification: Connection closed by remote host
ansible ssh到目标机器 时好时坏,报错: SSH Error: ssh_exchange_identification: Connection closed by remote host ...
- ssh_exchange_identification: Connection closed by remote host
用服务器内网ip连接同子网服务器的时候显示ssh_exchange_identification: Connection closed by remote host 防火墙什么都关闭了,还是显示这个问 ...
- ssh连接提示 "Connection closed by remote host"
如果原来是可以用ssh连接的, 突然连接不上通常是连接数过多导致的. 解决方法一. 把SSH连接数改大 修改服务器上的这个文件:/etc/ssh/sshd_config 找到这行: # MaxSess ...
- sftp修改用户home目录后登录时报connection closed by remote host
在sftp用户需要修改登录根目录的情况下,我们可以修改/etc/ssh/sshd_config文件中ChrootDirectory /home/[path]的路径. 但是,在重启sshd服务后,sft ...
- ssh 连接不上报Connection closed by remote host
解决办法 (1)查看这两个文件是否有阻止cat /etc/hosts.deny cat /etc/hosts.allow (2)客户端连接数过多修改/etc/ssh/sshd_config中#MaxS ...
- xshell连接不了虚拟机处理方法(错误提示:Connection closing...Socket close.Connection closed by foreign host.Disconnected from remote host(localhost) at 08:47:23.)
一.问题描述:xshell连接不了虚拟机,出现错误提示:Connection closing...Socket close.Connection closed by foreign host.Disc ...
- 解决 SSH Connection closed by foreign host 问题
Xshell 报错 : 1.有可能是IP和别人冲突,改一下IP就好了 2.也有可能是文件权限的问题.改一下: cd /etc/ssh/ chmod ssh_host_* chmod *.pub 3.也 ...
- XShell提示Connection closed by foreign host的问题 和 路由器分配IP的规则
情况是这样的: VMware中有三个Linux机器分别是crxy99(192.168.1.99),crxy100(192.168.1.100),crxy101(192.168.1.101),crxy1 ...
- Escape character is '^]'. Connection closed by foreign host.
今天在用易汇金的接口回调时候,老是回调不到我的机器上面.我的ip通过公网映射,按说是可以访问到我的ip,思考是什么问题. 1.防火墙关闭,不行 2.防火墙开启,但是把自己的端口号改为可以访问(参考:h ...
随机推荐
- python r(不进行转义)的用法
第一种用法,直接针对字符串:r‘E:\ui\bbq.txt’ 第二种用法,针对变量名:r'' + 变量名
- 04-spark streaming
1.基本概念(了解) ①流(Streaming): 是一种数据传送技术,它把客户机收到的数据变成一个稳定连续的流,源源不断地送出,使用户听到的声音或看到的图象十分平稳, 而且用户在整个文件送完之前就可 ...
- jenkins2.0以后的版本提供自动部署和远程部署功能?
metting result comment: 持续集成:dev上使用 持续部署:在dev/uat/prod上使用 1.指定时间自动构建--发布第二天挂了?每次构建需要重新编译?qa和uat使用同一套 ...
- python零散补充与总结
一 有一种情况,在Windows系统上面有一个文件,编码为gbk,将其上传到Linux虚拟机,系统编码为utf-8, 使用cat命令查看时是乱码,这时如何解决? [root@localhost ~]# ...
- HBase中无法使用backspace删除
转载自:Hbase命令行无法删除的问题 在HBase的shell命令行界面输入错误项按"退格键"删除,却怎么也删除不了: 解决办法: 第一步,修改SecureCRT的设置参数: 第 ...
- 34.纯 CSS 创作在文本前后穿梭的边框
原文地址: https://segmentfault.com/a/1190000015045700 感想: 动画 + z-index:n ; HTML code: <div class= ...
- Maven私服安装
下载安装包:nexus(https://www.sonatype.com/download-oss-sonatype) 默认用户密码字符串: adminAdministratorUseractive& ...
- 星号三角形 I python
'''星号三角形 I描述读入一个整数N,N是奇数,输出由星号字符组成的等边三角形,要求:第1行1个星号,第2行3个星号,第3行5个星号,依次类推,最后一行共N的星号.输入示例1:3输出示例2: * * ...
- twisted的installReactor()函数
#twisted的安装反应堆函数def installReactor(reactor): """ Install reactor C{reactor}. @param r ...
- UIPanGestureRecognizer translateInView, locationInView
假设在panGesture的回调事件里已经拿到了panGestureRecognizer CGPoint point = [panGestureRecognizer locationInView:se ...