V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
JoeyChan
V2EX  ›  问与答

iTerm2 如何保持连接

  •  
  •   JoeyChan · 2014 年 12 月 22 日 · 28241 次点击
    这是一个创建于 4045 天前的主题,其中的信息可能已经有所发展或是发生改变。
    刚接触iTerm2,用起来感觉还不错,就是不知道如何保持连接,让ssh不断线。
    11 条回复    2015-11-10 11:40:37 +08:00
    kikyous
        1
    kikyous  
       2014 年 12 月 22 日 via Android
    这不是iterm的事
    EPr2hh6LADQWqRVH
        2
    EPr2hh6LADQWqRVH  
       2014 年 12 月 22 日
    是ISP切断的,无解
    shibo501c
        3
    shibo501c  
       2014 年 12 月 22 日
    断网了就不行了,如果是关闭tab的话,重新打开快速连接的话,可以设置ssh/config
    cat ~/.ssh/config
    Host *
    ControlMaster auto
    ControlPath ~/.ssh/%h-%p-%r
    ControlPersist yes
    pinepara
        4
    pinepara  
       2014 年 12 月 22 日
    mosh
    JoeyChan
        5
    JoeyChan  
    OP
       2014 年 12 月 22 日
    谢谢几位解答,我意思不是指isp切断的问题,是ssh空闲断开的问题,securecrt有个send protocol no-op的功能,我是想实现同样的功能,还有就是,如果真的断线让它自动重连。
    tftk
        6
    tftk  
       2014 年 12 月 22 日
    tmux 用了不想停。
    ernest
        7
    ernest  
       2014 年 12 月 22 日
    tmux 根本停不下来
    Csineneo
        8
    Csineneo  
       2014 年 12 月 22 日   ❤️ 4
    profiles -> sessions -> When idel, send ASCII code
    JoeyChan
        9
    JoeyChan  
    OP
       2014 年 12 月 22 日
    @Csineneo 非常感谢,就是这个。
    tonghuashuai
        10
    tonghuashuai  
       2014 年 12 月 22 日
    tmux +1
    Weeek
        11
    Weeek  
       2015 年 11 月 10 日
    在客户端的 ~/.ssh/ 文件夹中添加 config 文件,并添加配置: ServerAliveInterval 60

    http://www.cnblogs.com/dudu/archive/2013/02/07/ssh-write-failed-broken-pipe.html
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   942 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 18:55 · PVG 02:55 · LAX 10:55 · JFK 13:55
    ♥ Do have faith in what you're doing.