Review: Mosh
Whether you administer your own server or VPS or occasionally log into someone else’s, Mosh is a tool that’s so useful it’s surprising that it’s not included by default in all distributions. In a nutshell, Mosh logs you into your server using SSH as you’re used to, but then opens a connection using the UDP protocol that lets you keep your session open indefinitely – even if your connection drops or your IP address changes. This is extremely useful for a variety of purposes, e.g., to quickly fire up a long-running process and keep its output visible, or to keep a remote session open for debugging purposes while writing code.
Of course, keeping a highly privileged session open indefinitely creates security risks if your device gets compromised, so use your own best judgment. Mosh also doesn’t have built-in scrollback, so you may have to pipe commands into tools like less
. That said, I’ve found it an indispensable tool, well worth the initial setup effort on the remote server where it’s used. There is even an Android client, which lets you take full advantage of the ability to keep your session open with intermittent connectivity.