Why Mosh is better than SSH?
Mosh (stands for Mobile Shell) is replacement of SSH for remote connections to Unix/Linux systems. It brings a few noticeable advantages over well known SSH connections. In brief, it’s faster and more responsive, especially on long delay and/or unreliable links.
Key benefits of Mosh
Stays connected if your IP is changed. Roaming feature of Mosh allows you to move between Internet connections and keep Mosh session online. For example, if your wifi connection changes IP you don’t need to reconnect.
Keeps session after loosing connection. For example, if you lost Internet connection for some time, or your laptop went offline due to exhausted battery – you’ll be able to pick up previously opened Mosh session easily.
No root rights needed to use Mosh. Unlike SSH Mosh server is not a daemon that needs to listen on specific port to accept incoming connections from clients. Mosh server and client are executables that could be run by ordinary user.
The same credentials for remote login. Mosh uses SSH for authorization so in order to open connection you need the same credentials as before.
Responsive Ctrl+C combination. Unlike SSH Mosh doesn’t fill up network buffers so even if you accidentally requested to output 100 MB file you’ll be able to hit Ctrl+C and stop it immediately.
Better for slow or lagged links. Have you ever tried to use SSH on satellite link where average RTT is 600 ms or more? Wish Mosh you don’t need to wait until server replies to see your typing. It works in CLI and such programs as vi or emacs so on it makes it possible to do the job slow connections more comfortably.
Well, there are some disadvantages too:
No IPv6 support.
Mosh is available for all major Linux distributions, FreeBSD and Mac OS X systems:
Ubuntu (12.04 LTS) or Debian (testing/unstable): sudo apt-get install mosh
Gentoo: emerge net-misc/mosh
Arch Linux: packer -S mobile-shell-git
FreeBSD: portmaster net/mosh
Mac OS X: mosh-1.1.3-2.pkg
P.S. It’s better that combination of SSH and GNU Screen.