解决 SSH Connection closed by foreign host 问题
用 Xshell 连接服务器总是报错 :
- Connection closed by foreign host.
- Disconnected from remote host...
原因可能是 SSH 服务器没设置保活时间间隔 , 具体设置如下 :
操作
- # vim /etc/ssh/sshd_config
添加两行 , 或去掉注释 :
- ClientAliveInterval 60
- ClientAliveCountMax 3
重启 SSH 服务 :
- /etc/init.d/ssh restart
- systemctl restart sshd //这个命令我没执行成功,最后还是远程连接上了
补充
ClientAliveInterval 参数数值是秒 , 是指超时时间 , 上面设置的是一分钟 ;
ClientAliveCountMax 设置允许超时的次数 , 上面设置的是允许三次 , 之后就关闭连接 ;
解决 SSH Connection closed by foreign host 问题相关推荐
- xshell 常用配置_Xshell连接报Connection closed by foreign host错误的解决办法
最近阿里云服务器控制管理平台升级后变化很大,在服务器安全上也更加完善,部分功能也加入付费需求,系统打补丁也开始收钱啦.导致很多人在用Xshell连接服务器的时候莫名报很多错误. 下面说说最常报的连接错 ...
- docker 运行镜像后,telnet 出现Connection closed by foreign host或连接被重置(已解决)
看了一天了,查看了各种帖子,都没解决.自己终于看出问题来了 telnet 会报Connection closed by foreign host 网页会报,连接被重置 搞定
- Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote hos
SSH连接服务器出错 Connection closing...Socket close. Connection closed by foreign host. Disconnected from r ...
- Unencrypted connection refused. Goodbye. Connection closed by foreign host.
telnet 登录提示:Unencrypted connection refused. Goodbye. Connection closed by foreign host. 原因:ekrb5-tel ...
- xshell连接突然报Connection closed by foreign host.
1问题描述报错 Connection closed by foreign host. Disconnected from remote host(yaoGS) at 155513. 2登入虚拟机 在l ...
- telnet Connection closed by foreign host.
以前了解过telnet信息,类似于ssh的服务,但是不安全.后来就使用telnet的网络分析功能来分析网络的联通性了. 今天同事问到我,Connection closed by foreign hos ...
- Connection closed by foreign host. 误改BUG
昨天调试远程服务器,为了增加socket链接数,理所当然的进行了limits.conf配置,之后悲剧发生了. 利用xshell再度远程时,被强制T了.链接瞬间即断,如果幸运,会弹出 "Con ...
- linux 报错:telnet Connection closed by foreign host
0.美图 1.背景 链接kudu 报错. # telnet samba.xx.com 7051 Trying 172.xx1.xx.33... Connected to samba.example.c ...
- shell中Connection closed by foreign host问题解决
shell中Connection closed by foreign host问题解决 ip冲突导致连接中断 换成wifi连接
最新文章
- python语言的解释性特点指的是编写的程序不需要编译_解释性与编译型 Python2和python3的区别...
- PHP删除文件unlink
- session实现验证码功能
- 【MongoDB学习笔记21】MongoDB的复合索引
- 固定资产打开提示:上年度数据未结转!
- java用户角色权限管理 只显示姓_快递物流管理系统SSM,JQUERYEASYUI,MYSQL
- Python 入门到精通(—)初识Python
- Linux在线安装Mysql数据库(Linux)
- nand flash和nor flash区别_从闪存的发展历史看,eMMC与NAND Flash有什么区别与联系?...
- ORB-SLAM3 代码解读
- BBS论坛系统需求说明书
- 最容易扩展的光立方程序设计
- 电商ERP软件、订单管理系统、库存管理系统
- android一键改机之真改机build.prop
- xctf攻防世界 MISC高手进阶区 flag_universe
- Pidgin 2.3.1语言设置方法
- 中国数据量占全球27.8%!安防能否借机“回血”?
- Oracle 递归查询SQL
- Buffon投针问题
- [Win32]重绘的基本概念以及简单的文本输出文本输出
热门文章
- winform 判断控件有没有被遮挡_编程入门基础之 winform(2)
- 什么是事务、事务特性、事务隔离级别、spring事务传播特性
- AZURE 日志分析自动告警
- golang 包含 数组_Golang数组类型
- python断点调试_「Python调试器」,快速定位各种疑难杂症!!!
- 数据结构 - 栈(链表实现栈的入栈出栈)
- 【Python CheckiO 题解】I Love Python!
- PWN-PRACTICE-BUUCTF-23
- 华为双系统是鸿蒙系统吗,华为p50pro是鸿蒙系统吗-华为p50pro有双系统吗
- 【POJ - 1486】Sorting Slides(思维建图,二分图求必须边,关建边,图论)