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: https://mosh.org/

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: https://mosh.org/mosh-paper.pdf


Releaseworks Academy has a free online training course on Docker & Jenkins best practices: https://www.releaseworksacademy.com/courses/best-practices-docker-jenkins