Roaming SSH With Mosh

Use a remote shell that stays responsive and survives network changes.

LinuxsshnetworkshellLow risk
Run mosh user@host to open a roaming shell session.

01Command

Command
$ mosh user@host

02What it does

Mosh establishes a connection over SSH, then switches to its own UDP state-synchronization protocol with local echo, so typing feels instant and the session survives sleep, Wi-Fi changes and IP changes. It must be installed on both client and server.

03Risk

RiskLow risk
Requirementssudo apt install mosh
!Warning: Mosh needs UDP ports 60000-61000 open, which some firewalls block; it also does not forward ports like ssh -L.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Mosh
    Official project · vendor-doc · 2026-09-20
    Evidence: Debian packages Mosh, the mobile shell that survives roaming and intermittent connectivity.
  • Debian package: mosh
    Debian · vendor-doc · 2026-09-20
    Evidence: Debian packages Mosh, the mobile shell that survives roaming and intermittent connectivity.

Last verified: 2026-09-22 · Category: Network

06Related solutions