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 ...
随机推荐
- linux:ubuntu安装mysql(二)--推荐
1)下载mysql安装包mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz,下载地址:https://dev.mysql.com/downloads/mysql/ 2 ...
- jQuery插件——下拉选择框
其实,之前也写过jQuery插件,今天写的是一个模拟select选择的下拉插件. 既然是jQuery插件,那么必然是依赖jQuery的了. 老规矩,直接上代码吧! ;(function () { $. ...
- 零基础学习python_模块(50-52课)
今天学了下模块,那什么是模块呢?其实我们写的以py结尾的一个文件就是一个模块,模块也就是程序 还记得我们之前学过容器.函数.类吧 容器 -> 数据的封装 函数 -> ...
- 零基础学习python_异常处理(32-33课)
我们写完python执行的时候是不是经常会遇到报错,而且报错都是大片红字,这样给别人的感受就是你写的程序怎么老是出问题啊,这样我们还咋么混下去呢?于是乎,就有了异常处理的东东. python的try语 ...
- Nginx配置跨域请求“Access-Control-Allow-Origin”
当出现403跨域错误的时候 No 'Access-Control-Allow-Origin' header is present on the requested resource,需要给Nginx服 ...
- Ubuntu 14.04 配置OpenCv 2.4.9
安装工具 g++ 链接:http://www.cnblogs.com/LQLin168/p/6844593.html 下载OpenCv 2.4.9(官网地址):http://opencv.org/ ...
- java 获得系统当前时间
import org.junit.Test; import java.text.SimpleDateFormat; import java.util.Calendar; import java.uti ...
- Hibernate架构
参照: http://blog.csdn.net/lovesummerforever/article/details/19169779 http://www.w3cschool.cn/hibernat ...
- VS2017创建一个 ASP.NET Core2.0 应用,并搭建 MVC 框架
https://testerhome.com/topics/11747 1.使用最新版本的VS2017,并安装.NET Core2.0中相关开发工具 2.打开VS2017,点击文件-新建-项目,选 ...
- java位运算(操作)的使用
位操作是程序设计中对位模式按位或二进制数的一元和二元操作. 在许多古老的微处理器上, 位运算比加减运算略快, 通常位运算比乘除法运算要快很多. 在现代架构中, 情况并非如此:位运算的运算速度通常与加法 ...