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 ...
随机推荐
- 【做题】CF177G2. Fibonacci Strings——思维+数列
题意:定义斐波那契字符串为: $f_1 = $ "a" \(f_2 =\) "b" \(f_n = f_{n-1} + f_{n-2}, \, n > 2 ...
- Linux/shell: remove adjacent similar patterns
cat > temp004AA1abcAA2AA3abcAA4abcAA5AA6 awk 'BEGIN {pre=0; str="";} { if(NR==1){ i ...
- Asp.net MVC 控制器ActionResult的例子
ActionResult 父类型 ViewResult View() 多重载应用 PartialViewResult PartialView() 部分试图 New EmptyResult() 空 如 ...
- 深度学习课程笔记(六)Error
深度学习课程笔记(六)Error Variance and Bias: 本文主要是讲解方差和偏差: error 主要来自于这两个方面.有可能是: 高方差,低偏差: 高偏差,低方差: 高方差,高偏差: ...
- Unsupervised Image-to-Image Translation Networks --- Reading Writing
Unsupervised Image-to-Image Translation Networks --- Reading Writing 2017.03.03 Motivations: most ex ...
- 【Mybatis】-- Mapper动态代理开发注意事项
1.1. Mapper动态代理方式 1.1.1. 开发规范 Mapper接口开发方法只需要程序员编写Mapper接口(相当于Dao接口),由Mybatis框架根据接口定义创建接口的动态代理对象,代理对 ...
- js运算符的一些特殊应用
作者: 小文 来源: http://www.cnblogs.com/daysme/ 时间: 2017/3/2 17:21:03 本文集合了了js运算符的一些特殊应用. js位运行符的运用. js运算符 ...
- FI CO 常用表
FI CO 常用表 最近写FICO的报表写得有点多,许多Table记不住,用F1查找又有点费事,不如把表单写下来,以后用到,直接在这上面找得了. 1,账目表主数据 SKA1 SKB1 S ...
- Linux 命令之sed
简介 sed 是一种在线编辑器,它一次处理一行内容.在处理的时候,会先把当前处理的行存储在临时缓冲区,这被称之为 "末世空间", 然后再使用 sed 命令处理缓冲区的内容,处理完成 ...
- [从零开始搭网站五]http网站Tomcat配置web.xml和server.xml
点击下面连接查看从零开始搭网站全系列 从零开始搭网站 上一章我们在CentOS下搭建了Tomcat,但是还是没有跑起来...那么这一章就把最后的配置给大家放上去. 有两种方式:一种是用 rm -f 给 ...