Mosh: SSH for the 21st Century

Mosh is an SSH replacement, providing persistent shell connectivity. For power users, Mosh brings several advantages to the table against the incumbent SSH.

The Basics

  1. Persistent sessions. If the connection you are using drops, Mosh will save the history & state of the shell for you. When you reconnect it will all be there. So, changing WiFi access points, switching to lan, or to a 4g tethered connection, your session will pick up where you left off, automatically.

  2. With SSH, over high latency connections most users can type faster than the prompt. This is because an SSH shell will not show a character until the client has received confirmation from the server. In extreme latency cases this means dropped characters. With Mosh, the experience is the same as typing in your own shell. If the connection has high latency, Mosh will temporarily prevent the command from being executed until the typed line is confirmed.

  3. Process Halting. With Mosh you can always hit Control-C to halt a runaway process, when SSH would be too busy looping over the runaway process.

  4. Open source [ Github], available on Linux, OSX, Android, and jailbroken iOS.


apt-get install mosh
OSX via HomeBrew
brew install mobile-shell


$ mosh # Basic connection
$ mosh user@ # Connecting w/user
$ mosh user@host-name # including Avahi (favorite for RPI access over lan)