Recently, I’ve been using mosh everywhere I work. Unfortunately some systems like my university refuse to upgrade to newer and better technolgies in favor of enhancing the school’s security.

I had a tough time adjusting to broken ssh pipes every time I would move class rooms but I finally got a work-around that seems stable enough.

What’s needed for the magic?

  • autossh This a daemon that runs on your local machine and keeps a monitor open on a network port. Upon the detection of dead SSH tunnels, it saves the last known state and tries to reconnect when network connecitivity is available again.
autossh -M 20000 -f -N serverName -u userName
  • screen
    screen is not new to me, infact I used to use it heavily before using to tmux. I’ve recently found an extremely light weight config on the interwebs. Here’s a link to my customized fork of it.