SSH "Write failed:Broken pipe"超时相关问题修复

博主热衷各种互联网技术,常啰嗦,时常伴有强迫症,常更新,觉得文章对你有帮助的可以关注我。 转载请注明"深蓝的镰刀"



在使用ssh时经常因为一段时间没有操作ssh,便出现了“Write failed:Broken pipe”的错误提示,然后就要重新再登录ssh的情况。

原因就是超过了服务器需要客户端发出响应的时间,解决办法只要配置一下服务器上的SSH即可。

打开/etc/ssh/sshd_config

vim /etc/ssh/sshd_config 

配置以下两项

ClientAliveInterval 360
ClientAliveCountMax 10

其中ClientAliveInterval表示允许每次超时的间隔(单位秒),ClientAliveCountMax表示允许超时的次数,结合起来就是允许超时360 * 10 秒(1小时)

重启以下ssh服务

service sshd restart

Stopping sshd:                                             [  OK 
]

Starting sshd:                                             [  OK 
]

done。

时间: 2024-08-07 08:36:26

SSH "Write failed:Broken pipe"超时相关问题修复的相关文章

ssh 链接服务器出现 Write failed: Broken pipe

方法来源 Ssh “Write failed: Broken pipe” - NewInstance I started to get this error “Write failed: Broken pipe” when I was leaving the terminal alone.Since plumbers are still expensive, despite the crisis, I decided to fix the pipe by myself.Very easy, ju

(转) 解决ssh的"Write failed: Broken pipe"问题

解决ssh的"Write failed: Broken pipe"问题 问题场景 服务器环境:阿里云 Linux CentOS 主机 客户端:Mac OSX Terminal 问题现象 用 ssh 命令连接服务器之后,如果一段时间不操作,再次进入 Terminal 时会有一段时间没有响应,然后就出现错误提示: Write failed: Broken pipe 只能重新用 ssh 命令进行连接. 解决方法 方法一:如果您有多台服务器,不想在每台服务器上设置,只需在客户端的 ~/.ssh

解决Linux下ssh登录后出现 报错 Write failed: Broken pipe 的方法

解决也很简单,在执行 ssh 命令的时候,多加一个参数即可,如下: ssh -p 2200 -o ServerAliveInterval=60 [email protected] #服务器 8.8.8.8 的远程端口号为2200,增加标红的参数 原文地址:https://www.cnblogs.com/x00479/p/11327195.html

PHP系列 | PDO::prepare(): send of 68 bytes failed with errno=32 Broken pipe

cli 模式报错 [2019-11-20T14:33:25+08:00][ error ] [8]PDO::prepare(): send of 68 bytes failed with errno=32 Broken pipe error 相关代码 class RedisSubscribe { public function subscribe() { $redis = BaseRedis::plocal(); $redis->setOption(\Redis::OPT_READ_TIMEOU

错误号org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe

在说这个错误之前,我先介绍下背景,我们项目用的是SpringBoot框架,集成Hprose+spring+mybatis,Hprose是什么,可以参考我上篇对Hprose的一个简单介绍.当前项目业务是抓取一个网站近5年的足球篮球的赔率数据.所以这是个按照日期进行的一个大循环.介于Hprose特性,Hprose服务端的处理时间会特别长,这是个重点. 在项目上线抓取数据时,linux环境下,我们的程序出现了这样一个错误,如下: 2016-06-16 12:47:52.190 WARN 10150 -

Python的问题解决: IOError: [Errno 32] Broken pipe

遇到一个很奇怪的问题, web.py代码里面报错IOError: [Errno 32] Broken pipe 启动命令: nohup python xxx.py > xxx.log & ssh登录到机器上, 启动, 不会出现远程ssh执行启动脚本, 就会出现IOError问题 查看进程pid, ll /proc/<pid>/fd 发现, stderr也就是fd为2的文件, 竟然是个pipe, 是个broken pipe, 错误的地方找到了 猜测可能是ssh登录过去, nohup

解决weblogic错误:java.sql.SQLRecoverableException: IO Error: Broken pipe

首先说一下系统基础架构: 服务器:weblogic11g集群 数据库:oracle数据库Rac 出错信息: 1.java.sql.SQLRecoverableException: Closed Connection 2.Test "SELECT 1 FROM DUAL" set up for pool "mds-soa" failed with exception: "java.sql.SQLRecoverableException: IO Error:

Hive中使用Python实现Transform时遇到Broken pipe错误排查

Hive中有一表,列分隔符为冒号(:),有一列utime是Timestamp格式,需要转成Weekday存到新表. 利用Python写一个Pipeline的Transform,weekday.py的代码也很简单: import sys import datetime for line in sys.stdin: line=line.strip() uid,mid,rating,utime=line.split(':') weekday=datetime.datetime.fromtimestam

hive使用python脚本导致java.io.IOException: Broken pipe异常退出

反垃圾rd那边有一个hql,在执行过程中出现错误退出,报java.io.IOException: Broken pipe异常,hql中使用到了python脚本,hql和python脚本近期没有人改过,在10.1号时还运行正常,但是在10.4号之后运行就老是出现相同的错误,而且错误出现在stage-2的reduce阶段,gateway上面的错误提示如下: 2014-10-10 15:05:32,724 Stage-2 map = 100%, reduce = 100% Ended Job = jo