Sea of Troubles

➞ Mosh: Mobile Shell

Keith Winstein et al at MIT have released Mosh (for “Mobile Shell”). They describe it as a:

Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh is a replacement for SSH. It’s more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

After a few minutes of testing, it seems to do what it says on the label. Because our new house doesn’t have internet connectivity yet, I’m spending more and more time on cellular data networks; SSH feels very brittle on these connections, and I have to reconnect about once an hour. Mosh promises to supply a more robust connection that, as they say,

makes remote servers “feel” more like the local machine!

Certainly, it feels much lower latency in recognising keystrokes than the standard ssh connection next to it. It helpfully underlines keystrokes that have been recognised locally but haven’t yet been acknowledged by the remote host (or at least, that’s what I assume it means).

I like, too, that it piggybacks session negotiation and authentication off the ssh protocol. I had to add one firewall rule to my linode, to allow a single inbound udp port; that’s very reassuring. Even the two factor authentication provided by Duo worked perfectly without reconfiguration.

Update: My favourite feature is one I didn’t anticipate when first exploring mosh — if I close the lid on my laptop, my session’s alive when I open it, without forcing me to reauthenticate. This still feels like magic to me.