Mosh (Mobile Shell) — Survive Flaky Connections

Tempest has built-in Mosh (Mobile Shell) — survive flaky Wi-Fi, laptop sleep, and IP changes with the same UI as a normal SSH tab.

Tempest's Mosh support gives you SSH that survives sleep, network changes, and lossy Wi-Fi. Bootstrap over your normal SSH connection, then Tempest switches the session to UDP and keeps the terminal alive even when your laptop goes through three different networks on the train ride home.

If you've ever lost a vim buffer to a 30-second VPN drop, this is the doc you wanted.

How Mosh works

Standard SSH runs over TCP — when the underlying connection breaks, the session dies. Mosh:

  1. Uses your existing SSH credentials to bootstrap (so you don't need a new auth method).

  2. Spawns mosh-server on the remote.

  3. Switches the terminal to a UDP-based protocol with a moving session key.

  4. Reconnects automatically when your IP changes or when the network drops out and comes back.

The visible result: type a command, close your laptop lid, walk home, open it on a different Wi-Fi — your prompt is still there, your vim is still open, your tail -f resumes from where it left off.

Enable Mosh on a connection

  1. Edit your SSH host.

  2. Toggle Mosh on in the Transport section.

  3. Optional: customize the mosh-server command (default: mosh-server new -s -c 256 -l LANG=en_US.UTF-8).

  4. Save and reconnect.

Server-side requirements

  • mosh (or at least mosh-server) installed on the remote: apt install mosh, brew install mosh, etc.

  • UDP ports 60000–61000 open on the firewall (Mosh picks one in this range).

What doesn't work with Mosh

Mosh closes the SSH channel after bootstrap, so anything that needs the underlying SSH connection is unavailable while Mosh is active:

  • SFTP file transfer (use a separate non-Mosh tab)

  • Port forwarding

  • Tempest Monitoring (no SSH channel to run sample commands)

  • Connection multiplexing

  • Tempest agent injection

  • X11 forwarding

These constraints come from how Mosh works, not from Tempest specifically.

Windows note

Mosh is not supported on Windows in Tempest. If you enable Mosh on a Windows install, Tempest will fall back to plain SSH and warn you. The Mosh protocol depends on mosh-server and the upstream Mosh project doesn't ship a Windows client.

See also

Last updated