Skip to content
A simple but poweful alternative front end for Mosh
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Mosh 2

A simple but powerful alternative frontend for Mosh

Key Features

  • Simple and portable
  • Supports SSH command line arguments without any change
  • Developed for performance. Connect in as low as ~0.020s.
  • Provides session caching for instant connection


  • Mosh
  • Not a requirement, but tested only on Ubuntu


  • Just run wget -q -O - | bash and then restart your shell program!


Supports SSH command format

In SSH you do ec2 -v -p 2020

In Mosh you have to do: mosh ec2 --ssh="-v -p 2020"

In Mosh 2 you can just do: mosh ec2 -v -p 2020

Support SSH Multiplexing

Original Mosh client disable SSH multiplexing with no workaround to enable it. With multiplexing, you can re-use existing TCP for multiple concurrent SSH sessions rather than creating a new one each time. Result is much faster connections.

# Without SSH Multiplexing
$ time ssh ec2 ls >/dev/null

real    0m1.965s
user    0m0.016s
sys     0m0.008s

# With SSH Multiplexing
$ time ssh ec2 ls >/dev/null

real    0m0.375s
user    0m0.004s
sys     0m0.000s

To enable SSH Multiplexing, add this on in your ~/.ssh/config

Host *
        ControlPath /var/tmp/ssh-%r@%h:%p
        ControlMaster auto
        ControlPersist 5m

For more information regarding Multiplexing, see [this] (

Session caching

It supports caching of a new SSH session. So a new cached session will always be ready for you to access anytime. It can reduce session connection time to ~0.020s

To use this feature, just replace mosh with mosh-cache in your commands.

Provide shortcode for --predict=experimental

In Mosh you have to do: mosh ec2 --predict=experimental

In Mosh 2 you can just do: mosh ec2 -pe

You can’t perform that action at this time.