V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
JoeyChan
V2EX  ›  问与答

iTerm2 如何保持连接

  •  
  •   JoeyChan · Dec 22, 2014 · 28392 views
    This topic created in 4145 days ago, the information mentioned may be changed or developed.
    刚接触iTerm2,用起来感觉还不错,就是不知道如何保持连接,让ssh不断线。
    11 replies    2015-11-10 11:40:37 +08:00
    kikyous
        1
    kikyous  
       Dec 22, 2014 via Android
    这不是iterm的事
    EPr2hh6LADQWqRVH
        2
    EPr2hh6LADQWqRVH  
       Dec 22, 2014
    是ISP切断的,无解
    shibo501c
        3
    shibo501c  
       Dec 22, 2014
    断网了就不行了,如果是关闭tab的话,重新打开快速连接的话,可以设置ssh/config
    cat ~/.ssh/config
    Host *
    ControlMaster auto
    ControlPath ~/.ssh/%h-%p-%r
    ControlPersist yes
    pinepara
        4
    pinepara  
       Dec 22, 2014
    mosh
    JoeyChan
        5
    JoeyChan  
    OP
       Dec 22, 2014
    谢谢几位解答,我意思不是指isp切断的问题,是ssh空闲断开的问题,securecrt有个send protocol no-op的功能,我是想实现同样的功能,还有就是,如果真的断线让它自动重连。
    tftk
        6
    tftk  
       Dec 22, 2014
    tmux 用了不想停。
    ernest
        7
    ernest  
       Dec 22, 2014
    tmux 根本停不下来
    Csineneo
        8
    Csineneo  
       Dec 22, 2014   ❤️ 4
    profiles -> sessions -> When idel, send ASCII code
    JoeyChan
        9
    JoeyChan  
    OP
       Dec 22, 2014
    @Csineneo 非常感谢,就是这个。
    tonghuashuai
        10
    tonghuashuai  
       Dec 22, 2014
    tmux +1
    Weeek
        11
    Weeek  
       Nov 10, 2015
    在客户端的 ~/.ssh/ 文件夹中添加 config 文件,并添加配置: ServerAliveInterval 60

    http://www.cnblogs.com/dudu/archive/2013/02/07/ssh-write-failed-broken-pipe.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3372 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 830ms · UTC 12:52 · PVG 20:52 · LAX 05:52 · JFK 08:52
    ♥ Do have faith in what you're doing.