Burst VPS 使用 ssh 停一段时间在去操作老出现 Write failed: Broken pipe 怎么办?

Linux VPS 支持
回复
头像
jiyinyiyong
帖子: 631
注册时间: 2010-01-03 19:58
系统: OS X, Ubuntu(server)
来自: 杭州
联系:

Burst VPS 使用 ssh 停一段时间在去操作老出现 Write failed: Broken pipe 怎么办?

#1

帖子 jiyinyiyong » 2012-08-23 13:38

出现了 "Write failed: Broken pipe" 然后 ssh 就断了, 重新登录发现用户还是在的, 这是怎么回事啊?
这个问题和 TIMEOUT 的设置有关系么? 我其实是想设置自动退出的.
rediscover
帖子: 3173
注册时间: 2010-01-13 23:26

Re: Burst VPS 使用 ssh 停一段时间在去操作老出现 Write failed: Broken pipe

#2

帖子 rediscover » 2012-08-24 22:47

burstnet会不定期kill掉长时间不活跃的ssh连接,所以要keepalive的话就搞出来点数据传输。
Here I am.
Ubuntu 桌面培训 - 全中文官方文档,含汉化截图,提供PDF
头像
jiyinyiyong
帖子: 631
注册时间: 2010-01-03 19:58
系统: OS X, Ubuntu(server)
来自: 杭州
联系:

Re: Burst VPS 使用 ssh 停一段时间在去操作老出现 Write failed: Broken pipe

#3

帖子 jiyinyiyong » 2012-08-25 21:27

rediscover 写了:burstnet会不定期kill掉长时间不活跃的ssh连接,所以要keepalive的话就搞出来点数据传输。
对啊. 还好后来找到代码解决了.
ServerAliveInterval 60
linux-wiki.cn/wiki/zh-hans/避免SSH连接因超时闲置断开
头像
jiyinyiyong
帖子: 631
注册时间: 2010-01-03 19:58
系统: OS X, Ubuntu(server)
来自: 杭州
联系:

Re: Burst VPS 使用 ssh 停一段时间在去操作老出现 Write failed: Broken pipe

#5

帖子 jiyinyiyong » 2012-08-26 11:18

acer4740 写了:mosh可以解决这个问题
有没有中文的博文介绍.. 搜不到啊楼上
freefall12
帖子: 17
注册时间: 2011-06-16 9:51

Re: Burst VPS 使用 ssh 停一段时间在去操作老出现 Write failed: Broken pipe

#6

帖子 freefall12 » 2013-01-02 22:52

在/etc/ssh/ssh_config里加上
TCPKeepAlive yes
回复