There are a lot of old tools that do their job pretty well and are fairly standard across the board. Hammers. Wheels. Screwdrivers.

When it comes to software there are also plenty of these. In recent years - particularly with the advent of the "rewrite in Rust" movement, but not limited to it - there have been quite a lot of them.

I try out some from time to time and some are cute, some are pretty darn good, but almost none of them actually land up in my "regular habits" toolbox. There are a few good enough that I've cut over to them entirely or are trying to actively make them part of my habits, so this is a mini-series of posts about these tools. There aren't ads - nobody is paying me for this (unfortunately), I just like them and want to share them.

The first cab off the rank is Mosh. Dubbed "the mobile shell," Mosh is designed for mobile environments as an alternative to interactive SSH. It uses SSH to get started, but then hands off to a UDP protocol that allows for connections to be interrupted and to switch IP address or route entirely.

With a traditional SSH connection, any interruption breaks what I was doing completely. That can also include interruptions like:

  • I unplugged my laptop from my docking station so it switched from ethernet to Wi-Fi
  • I took my laptop to work and back
  • I took switched from Wi-Fi to cellular
  • Something in the TCP stack is just having a bad day

I've noticed that since switching to Fish (a post for another day) and Ghostty (also a post for another day) I've had a lot more hiccups with my SSH connection. Then I remembered I had mosh installed, so I ran that, and after a week (I kid you not) I realised that I had the exact same connection running for that whole week without terminating.

Mosh is fairly easy to install and use (unless you want to get super pedantic about firewall rules since it asks for a large UDP allowance) and I find it sits quite well now in my toolbox for remotely accessing systems. I just have to remember to use it more, since I'm so used to just typing ssh <host> rather than mosh <host>.

Mosh is available for just about any platform I care about and I strongly recommend giving it a try.