Endorsing Mosh

Tuesday, 31 Mar 2015

Chris Siebenmann is skeptical about Mosh, which spurred me to write down my own feelings about it:

I Mosh!

When I’m traveling, I generally connect through hotel and conference networks that almost always exhibit precipitously fluctuating latencies, often-miserable throughput, and in some cases, near-tragic levels of packet loss. Just using Screen/Tmux/dtach over a SSH connection (as a commenter on Chris’ entry suggested) doesn’t come close to cutting it, because SSH itself is utterly unusable. I’ve had situations where connections would drop within seconds, every time I managed one, taking dozens of dozen-second tries to establish at all. On such a network, UDP is of the essence to get even an inkling of a usable connection. And only protocol-integrated predictive terminal emulation allows making full use of the benefits UDP offers then.

Then I embark on the journey back, and I throw Mosh out of my setup the minute I step off my return flight (or whatever else I am travelling on). If I have a network connection worth calling that, then the way Mosh operates – built-in non-optional detaching, inability to support SSH’s various forms of forwarding, and server-side per-session dæmons that never go away on error conditions – is grating. I can’t stand using it when I’m back in my usual haunts where I enjoy decent networking. (And it really doesn’t take a lot to count as decent network in this sense.)

So there you go. I’m very glad it exists, because when I need it, it’s a sanity lifeline. But it cannot do its job unseen, and you’re in a real bad place if you need it. So however grateful I may be, I much prefer to neither need nor use it.

If you think this sounds schizophrenic, that’s because it is. Indeed this is a strange endorsement, I realise that. But let me assure you: when I need Mosh, I am so happy it exists.