Get into DevOps is a blog about methodologies, practices and tools to improve software delivery.

Persistent SSH sessions with Mosh

Working with cellular data, I used to have problems with hanging SSH sessions for a decade. That is, until a friend of mine introduced me to mosh:

Mosh ("MObile SHell") is a drop-in replacement for SSH, which helps your sessions survive network changes seamlessly (drops, lag, IP changes - you name it).

You can install the unprivileged mosh-server component under your own user account on a server, and use the client to connect to it - just as you would with SSH. In fact, mosh establishes communication via SSH, so all your SSH keys/logins work just the same.


To do its magic, Mosh requires access to high UDP ports, so you might need to do firewall changes to make it work. That's however a small price to pay for the convenience it brings.

Edit: As kindly pointed out by /u/alkabetz, the mosh paper goes to great lengths explaining the internals:

Announcing: - The free dynamic DNS service for pros

Monitor public repositories in a Github organisation

Monitor public repositories in a Github organisation