Sentry
V2EX  ›  DevOps

希望在 Mac OS X 上始终和另外一台服务器保持 ssh 连接,断掉可以自动重连,有什么比较可靠的做法呢?

  •  
  •   Sentry · Aug 11, 2015 · 4987 views
    This topic created in 4123 days ago, the information mentioned may be changed or developed.
    4 replies  •  2015-08-11 14:07:36 +08:00
    xream
    xream
    Aug 11, 2015
    1
    有神器 mosh http://mosh.mit.edu/
    或者 autossh?
    Radeon
    Radeon
    Aug 11, 2015
    2
    自己写个bash的for循环调ssh,建议加上ServerAliveInterval参数,另外还建议for中间多写一句sleep 2,这样网络断掉的时候不会吃CPU
    franky_xhl
    franky_xhl
    Aug 11, 2015
    3
    mosh +1
    582033
    582033
    Aug 11, 2015
    4
    autossh
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   985 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:39 · PVG 03:39 · LAX 11:39 · JFK 14:39
    ♥ Do have faith in what you're doing.