Mosh
ActiveOverview
Mosh is a remote terminal application that uses SSH for initial authentication and then maintains a UDP-based connection for interactive shell sessions. It supports intermittent connectivity, allowing sessions to persist through network changes, client sleep/wake cycles, or IP address roaming. Designed as a more robust alternative to SSH for mobile users on unreliable networks like Wi-Fi or cellular.
Key Features
- Intermittent Connectivity - Keeps sessions alive during temporary network drops or client sleep/wake.
- Roaming Support - Allows client IP address changes, such as switching between Wi-Fi and cellular.
- Local Echo and Editing - Provides speculative local rendering of keystrokes for low-latency feel over high-latency links.
- UDP-Based Protocol - Uses State Synchronization Protocol (SSP) over UDP after SSH bootstrap for efficient state sync.
- Bidirectional Synchronization - Syncs screen updates and cursor state between client and server securely.
- SSH Authentication - Relies on existing SSH credentials and infrastructure for login.
- Line Editing Prediction - Predicts and locally applies common line edits like backspace and arrow keys.
Pricing
| Plan | Price | Includes |
|---|---|---|
| Community Edition | Free | Full open-source access, all features, source code. |
Platforms & Requirements
Available on most Unix-like systems including GNU/Linux, macOS, BSD variants, Solaris via native packages or source compilation. Mobile support on Android and iOS through third-party apps like Termius; Chrome via app. Windows support limited to Cygwin or MSYS2; requires UDP port access and SSH server setup.
Integrations & Ecosystem
- SSH for authentication
- Public key authentication
- Password authentication
- mosh-server on remote hosts
- Terminal multiplexers like tmux/screen
- Package managers (apt, brew, flathub)
Alternatives
| App | Difference |
|---|---|
| SSH | Standard SSH lacks roaming and intermittent connectivity support, uses TCP only. |
| tmux over SSH | Tmux persists sessions server-side but does not handle client network changes or local echo. |
| Tailscale Funnel | Provides remote shell access with better NAT traversal but less focus on local editing. |
| RustDesk | Full remote desktop tool, heavier than terminal-only Mosh. |
Reputation
Mosh is praised for improving remote shell usability on flaky mobile networks, saving significant time for developers and sysadmins. Common strengths include responsive feel and session persistence. Criticisms focus on UDP firewall issues requiring port forwarding and lack of native Windows support beyond Cygwin.
Sources (9)
- https://mosh.org
- https://github.com/mobile-shell/mosh
- https://forum.proxmox.com/threads/use-mobile-shell-mosh-with-proxmox.173209/
- https://www.themosh.org
- https://news.ycombinator.com/item?id=34069454
- https://en.wikipedia.org/wiki/Mosh_(software)
- https://www.usenix.org/conference/atc12/technical-sessions/presentation/winstein
- https://flathub.org/en/apps/org.mosh.mosh
- https://www.themosh.org/about