The mobile shell: a remote terminal that survives roaming and bad connections
open sourceGPL-3.0-or-later WITH Mosh OpenSSL exceptionself-hostablefree
Mosh (mobile shell) is a remote terminal that replaces interactive SSH sessions. It logs in over SSH with the same credentials, then starts mosh-server on the remote host and talks to it over UDP, so the session survives changing networks, a laptop going to sleep and dropped connections. It echoes your typing and line editing at once instead of waiting for the server, underlining predictions on a bad connection, and works in full-screen programs like vim and emacs. Both client and server run as an ordinary user with no daemon. It's UTF-8 only, and runs inside any terminal emulator or tmux. It installs from package managers on Linux, the BSDs, macOS and Solaris; JuiceSSH and Termux on Android, Blink Shell on iOS and Mosh for Chrome bring it to other devices.
Ways to install
Package managers
Problems it solves
- my SSH session freezes and drops every time my laptop switches Wi-Fi networks or wakes from sleep
- typing over SSH on a slow or high-latency connection feels laggy because every keystroke waits for the server
- keep a remote terminal session alive on a flaky mobile or train connection
- Control-C doesn't stop a runaway command over a laggy SSH connection
- a remote shell I can install without root on the server
Features
- roams between networks and survives sleep and dropped connections
- local echo and line editing with predictions underlined on bad links
- logs in through SSH, then uses its own UDP protocol
- no root and no daemon: client and server run as an ordinary user
- works inside any terminal emulator, screen or tmux; UTF-8 only
- true-colour support since 1.4
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Mosh does.
- Prompt 3 Panic's native SSH terminal for Mac, iPhone, iPad and Vision Pro, with Mosh and Eternal Terminal.
