moshterm

~ mosh

A free Mosh client for iPhone, iPad and Android

moshterm is a Mosh client for iPhone, iPad and Android, and it is free with no account. Install mosh-server on your computer, let UDP ports 60000–61000 through, and connect. The session survives network changes and a locked phone. If the host has no mosh-server, moshterm tries Eternal Terminal, then SSH.

App Store coming soon Get it on Google Play

Free, no account. moshterm Pro adds live previews.

Set up the host

Mosh signs in over SSH, then moves the session to UDP. The computer needs mosh-server. Add tmux too, so the session keeps running while your phone is away.

# macOS (Homebrew)brew install mosh tmux
# Debian, Ubuntu, WSLsudo apt install mosh tmux
# both should print a pathcommand -v mosh-server tmux

Let the UDP ports through

mosh-server picks a UDP port between 60000 and 61000 for each session. If the host has a firewall, open that range.

# ufw (Ubuntu, Debian)sudo ufw allow 60000:61000/udp
# firewalld (Fedora, RHEL)sudo firewall-cmd --permanent --add-port=60000-61000/udp && sudo firewall-cmd --reload

When the ports are closed, moshterm says the server didn't answer over UDP instead of leaving you at a blank screen.

What you get on the phone

  • Mosh is built into the app. There is nothing else to install on the phone.
  • Local echo shows what you type straight away on a slow link, before the host answers. Set it to Adaptive, Always or Off.
  • Auto tries Mosh first, then Eternal Terminal, then SSH, so a host without mosh-server still connects.
  • When you connect, pick one of the host's tmux, Zellij or Herdr sessions. If iOS or Android ends the app, opening it again puts you back there.
  • Unlimited hosts, keys kept in the iOS Keychain or Android Keystore, and a key bar with Esc, Tab, Ctrl and arrows.

Mosh and tunnels

Mosh needs UDP, so it can't run through a Cloudflare Tunnel, which carries TCP. Hosts you reach through a tunnel connect over SSH instead. See SSH through a Cloudflare Tunnel.

Questions

Is moshterm's Mosh client free?

Yes. Mosh, Eternal Terminal and SSH are all free in moshterm, with unlimited hosts and no account. The optional moshterm Pro subscription only adds live previews of dev servers and simulators.

Does the phone need anything besides the app?

No. The Mosh protocol is part of the app. Only the computer you connect to needs mosh-server.

Why does SSH work but Mosh doesn't?

Mosh starts over SSH on TCP, then needs a UDP port between 60000 and 61000 to reach the host. A firewall or network that blocks UDP stops it. Open the range, or connect with Eternal Terminal or SSH.