Mosh Guide
Mosh (mobile shell) is the protocol you want when your laptop sleeps, your Wi-Fi changes, or your tether drops every few minutes. It bootstraps over SSH, then keeps the session alive over UDP with no reconnection delay. Telnety ships a Mosh client on desktop.
When to use Mosh
- Flaky networks: 4G hotspot, train Wi-Fi, hotel networks that drop you every 10 minutes.
- Roaming: close the lid, walk to a meeting, open the lid — the session is still there.
- High-latency links: Mosh does local echo and line-edit prediction, so typing feels instant even at 300 ms RTT.
Mosh is not a security upgrade over SSH — it uses SSH for authentication and AES-OCB for the UDP channel. If your server forbids UDP, use SSH instead. See the SSH guide.
Server prerequisites
Mosh needs mosh-server installed on the remote host and a UDP port range open inbound (default 60000–61000).
Connecting from Telnety
When creating a new host, select Mosh as the protocol:
- SSH bootstrap: Telnety connects over SSH first to launch
mosh-server, then hands the session over to UDP. - Authentication: same as SSH — password, key, or agent. Host key TOFU rules apply.
- UDP port range: 60000–61000 by default. Adjust under host settings if your firewall uses a narrower window.
- Predictive echo: on by default — toggle in the session toolbar if your terminal feels "jumpy".
Roaming behavior
When your client IP changes — Wi-Fi to LTE, VPN connect/disconnect, sleep/wake — Mosh re-binds its UDP socket and continues without dropping the shell. Telnety shows a small "roaming…" indicator while the new path is being established. No reconnection prompt; no lost prompt buffer.
Limitations
- No port forwarding or tunneling — use SSH for those.
- No file transfer — use SFTP for those.
- UDP must be allowed end-to-end. Networks that block UDP (some corporate proxies) won't work.
- Mobile clients (Android, iOS) do not currently ship a Mosh implementation — use SSH there.