JoeyChan
V2EX  ›  问与答

iTerm2 如何保持连接

  •  
  •   JoeyChan · Dec 22, 2014 · 28783 views
    This topic created in 4336 days ago, the information mentioned may be changed or developed.
    刚接触iTerm2,用起来感觉还不错,就是不知道如何保持连接,让ssh不断线。
    11 replies  •  2015-11-10 11:40:37 +08:00
    kikyous
    kikyous
    Dec 22, 2014 via Android
    1
    这不是iterm的事
    EPr2hh6LADQWqRVH
    EPr2hh6LADQWqRVH
    Dec 22, 2014
    2
    是ISP切断的,无解
    shibo501c
    shibo501c
    Dec 22, 2014
    3
    断网了就不行了,如果是关闭tab的话,重新打开快速连接的话,可以设置ssh/config
    cat ~/.ssh/config
    Host *
    ControlMaster auto
    ControlPath ~/.ssh/%h-%p-%r
    ControlPersist yes
    pinepara
    pinepara
    Dec 22, 2014
    4
    mosh
    JoeyChan
    JoeyChan
    OP
    Dec 22, 2014
    5
    谢谢几位解答,我意思不是指isp切断的问题,是ssh空闲断开的问题,securecrt有个send protocol no-op的功能,我是想实现同样的功能,还有就是,如果真的断线让它自动重连。
    tftk
    tftk
    Dec 22, 2014
    6
    tmux 用了不想停。
    ernest
    ernest
    Dec 22, 2014
    7
    tmux 根本停不下来
    Csineneo
    Csineneo
    Dec 22, 2014❤️4
    8
    profiles -> sessions -> When idel, send ASCII code
    JoeyChan
    JoeyChan
    OP
    Dec 22, 2014
    9
    @Csineneo 非常感谢,就是这个。
    tonghuashuai
    tonghuashuai
    Dec 22, 2014
    10
    tmux +1
    Weeek
    Weeek
    Nov 10, 2015
    11
    在客户端的 ~/.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   ·   Privacy   ·   Solana   ·   1339 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 21:53 · PVG 05:53 · LAX 13:53 · JFK 16:53
    ♥ Do have faith in what you're doing.