Mosh - A replacement for SSH

July 30, 2013
Mosh is a secure shell that is touted as a replacement for the venerable SSH.

How is Mosh different from SSH ? Well, Mosh uses a new protocol called the State Synchronization Protocol (SSP) that runs over UDP. This means it is possible to synchronize the state of an object from one host to another.

Another unique innovation that Mosh offers is called Speculation. Mosh has a “split” terminal emulator that maintains images of the screen state at both the server and client and uses SSP to synchronize them.

This throws up many interesting possibilities for Mosh.

It allows roaming.

Use Wi-Fi on a train, Ethernet in a hotel, and LTE on a beach; you'll stay logged in.

Another useful feature of Mosh that beats SSH is - you do not need super user privileges to run Mosh. This is because the client and server are executables run by an ordinary user and last only for the life of the connection.

SSH Latency

The following are a few other features of Mosh that makes it a better Secure shell than SSH.

  • Supports only one character set - UTF-8. This fixes Unicode bugs in other terminals and in SSH.
  • Reduces network latency. It gives instant response to typing, deleting, and line editing. (See image above)
  • Handles packet loss gracefully. Ctrl + C always works to halt a runaway process.
  • Available for multiple platforms - Linux, FreeBSD, Mac OS X etc.
  • Recover from any sequence of dropped or reordered packets, no matter how long the connection has been interrupted.

Mosh website - mosh.mit.edu.