iTerm2 如何保持连接

2014-12-22 16:41:28 +08:00
 JoeyChan
刚接触iTerm2,用起来感觉还不错,就是不知道如何保持连接,让ssh不断线。
27459 次点击
所在节点    问与答
11 条回复
kikyous
2014-12-22 16:50:17 +08:00
这不是iterm的事
EPr2hh6LADQWqRVH
2014-12-22 16:51:17 +08:00
是ISP切断的,无解
shibo501c
2014-12-22 16:53:34 +08:00
断网了就不行了,如果是关闭tab的话,重新打开快速连接的话,可以设置ssh/config
cat ~/.ssh/config
Host *
ControlMaster auto
ControlPath ~/.ssh/%h-%p-%r
ControlPersist yes
pinepara
2014-12-22 16:56:50 +08:00
mosh
JoeyChan
2014-12-22 17:15:35 +08:00
谢谢几位解答,我意思不是指isp切断的问题,是ssh空闲断开的问题,securecrt有个send protocol no-op的功能,我是想实现同样的功能,还有就是,如果真的断线让它自动重连。
tftk
2014-12-22 17:17:39 +08:00
tmux 用了不想停。
ernest
2014-12-22 17:18:53 +08:00
tmux 根本停不下来
Csineneo
2014-12-22 17:25:49 +08:00
profiles -> sessions -> When idel, send ASCII code
JoeyChan
2014-12-22 17:35:22 +08:00
@Csineneo 非常感谢,就是这个。
tonghuashuai
2014-12-22 17:47:42 +08:00
tmux +1
Weeek
2015-11-10 11:40:37 +08:00
在客户端的 ~/.ssh/ 文件夹中添加 config 文件,并添加配置: ServerAliveInterval 60

http://www.cnblogs.com/dudu/archive/2013/02/07/ssh-write-failed-broken-pipe.html

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/155773

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX