Sentry
V2EX  ›  DevOps

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

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