ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe
ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe
参考文章:
https://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/
用 ssh 命令连接服务器之后,如果一段时间不操作,再次进入 Terminal 时会有一段时间没有响应,然后就出现错误提示:
packet_write_wait: Connection to 47.92.226.106 port 22: Broken pipe
只能重新用 ssh 命令进行连接。
Solution:
1.如果有多台服务器,不想在每台上设置,只需在客户端设置即可:
- 全部都保持连接:(root access required), edit
/etc/ssh/ssh_config - 只在你的user上设置:edit
~/.ssh/config(create the file if it doesn’t exist)
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
2. 如果有多台个人管理服务器,可以在服务器端配置:(没有效果!!)
make your OpenSSH server keep alive all connections with clients by adding the following to /etc/ssh/sshd_config:
ClientAliveInterval
ClientAliveCountMax
这些设置让ssh client or server发送一个空包到另一端,每5分钟一次。
如果它在尝试了2次后,仍没有收到任何响应,则放弃。即连接被断开了。
通过man ssu_config可以看到详细说明:
SYNOPSIS
~/.ssh/config
/etc/ssh/ssh_config DESCRIPTION
ssh() obtains configuration data from the following sources in the following
order: . command-line options
. user's configuration file (~/.ssh/config)
. system-wide configuration file (/etc/ssh/ssh_config)
ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe的更多相关文章
- ssh 登录报错 packet_write_wait: Connection to x.x.x.x port 22: Broken pipe
问题 更新个人博客文章时遇到:Error: packet_write_wait: Connection to 192.30.253.113 port 22: Broken pipe packet_wr ...
- SSH服务:packet_write_wait: Connection to 67.218.143.160 port 22: Broken pipe错误处理
1.在~/.ssh/config配置文件中添加 IPQoS lowdelay throughput 2.在/etc/ssh/ssh_config配置文件中添加 IPQoS lowdelay throu ...
- SSH错误:packet_write_wait: Connection to 10.57.19.250 port 22: Broken pipe
现象:ssh连接以后,服务器会主动断开连接,wireshark抓包,发线服务器会tcp rst,断开ssh连接 解决尝试:1.修改会话超时时间:2.客户端主动间隔性向服务器发送保活报文:3.服务端主动 ...
- 容器下载的是centos8的镜像,scp出现packet_write_wait: Connection to **** port 22: Broken pipe 问题解决
解决方案:在~/.ssh目录新建文件config vi ~/.ssh/config #Added lines to fix. Host * IPQoS lowdelay t ...
- idea启动服务连接mysql后 Navicat连接mysql就报错2013-Lost connection toMySQL server at
我是使用navicat的windows端 连接centos下mysql服务器 第一次常规连接mysql正常,idea启动服务连接mysql后 Navicat连接mysql就报错2013-Lost co ...
- 关于tp.5.0角色管理导致的创建角色登陆报错问题解决!
今天用tp 5.0的时候,遇到一个问题,就是在利用超级管理员创建管理员角色时,角色账号密码登陆报错的问题 解决方法如下 htaccess文件修改如下 <IfModule mod_rewrite. ...
- ab压力测试报错: apr_socket_recv: Connection reset by peer (104)
使用ab对网站进行压力测试,开始设置并发500,可以正常使用,当设置并发为1000,则报错: apr_socket_recv: Connection reset by peer (104) 改服务端a ...
- 【MySQL8】 安装后的简单配置(主要解决navicat等客户端登陆报错问题)
一.navicat等客户端登陆报错的原因 使用mysql,多数我们还是喜欢用可视化的客户端登陆管理的,个人比较喜欢用navicat.一般装好服务器以后,习惯建一个远程的登陆帐号,在mysql8服务器上 ...
- MVC模式下unity配置,报错“No connection string named '**Context' could be found in the application config file”
写在前面: 第一次配置时好好的,后来第二次改到MVC模式,把依赖注入写成字典的单例模式时,由于新建的ORM(数据库映射模型EF),怎么弄都不用,一直报错"No connection str ...
随机推荐
- Jenkins中的邮件配置
摘自http://blog.csdn.net/fullbug/article/details/53024562 Jenkins是一个很受欢迎的CI持续集成工具,能够实现项目的自动构建.打包.测试.发布 ...
- expr的字符串操作 表达式: length, index, match, substr等
参考: http://www.linuxidc.com/Linux/2012-04/58095.htm expr的格式, 主要有两个, 一是 用expr option, 选项: 二是, expr的几个 ...
- Ubuntu18.04安装Android Studio
一.安装JDK JDK下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.htm ...
- Jquery相关插件
jQuery 插件autocomplete 应用 介绍 $("#AccountNames").autocomplete(Accounts, { minChars: 0, match ...
- BZOJ 1064: [Noi2008]假面舞会(dfs + 图论好题!)
http://www.lydsy.com/JudgeOnline/problem.php?id=1064 题意: 思路: 考虑以下几种情况: ①无环并且是树: 无环的话就是树结构了,树结构的话想一下就 ...
- _instance_reset
制作多功能Item.creature及gameobject 中第19个功能 重置副本,关联到该表. 当该表中配置,且玩家有这个副本这个难度的进度时,功能宝石中会出现该副本的名字,点击可以重置副本 ma ...
- Codeforces 767D - Cartons of milk
题目链接:http://codeforces.com/contest/767/problem/D D比C水系列. 将商店里面的牛奶按照保质期升序排序(显然优先买保质期久的)考虑二分答案,然后再将整个序 ...
- python中那些双下划线开头得函数和变量
Python中下划线---完全解读 Python 用下划线作为变量前缀和后缀指定特殊变量 _xxx 不能用’from module import *’导入 __xxx__ 系统定义名字 __x ...
- 异常处理.VC++
ZC:个人这样 理解 C++的异常处理: ZC: (1).C++标准异常处理,try{}catch{} 抛异常:throw() [ 据说是包装的Windows函数RaiseException() ] ...
- Java中的单实例
前几天刚学完单实例设计模式,今天看代码时发现一行代码很奇怪,getRuntime()函数的返回类型怎么是它本身,忽然想起前几天学的单实例模式,于是找到方法的定义,果然是静态私有变量,获取实例的公有方法 ...