Wardterm documentation

Mosh

Use Mosh in Wardterm: install mosh-server, open the UDP ports, turn Mosh on for a server and choose how local echo works on a slow connection.

What Mosh does

Mosh keeps a session going when the network changes, for example from Wi-Fi to cellular data, or when the device sleeps. On a slow connection it shows what you type at once and confirms it when the server answers. It signs in over SSH first, with the usual host key check and login, then talks to the server over UDP.

Prepare the server

  1. Install Mosh. On Debian or Ubuntu:
    sudo apt install mosh
    On Fedora or Rocky Linux:
    sudo dnf install mosh
  2. Make sure the server has a UTF-8 locale, such as en_US.UTF-8 or C.UTF-8.
  3. Open the UDP ports 60000 to 61000 on the server and in your provider's firewall:
    sudo ufw allow 60000:61000/udp

Turn on Mosh

  1. Open the server, choose Show more, then Connection.
  2. Set Mosh to On. On a group, every server in it uses Mosh unless it chooses otherwise.
  3. If mosh-server is not on the server's path, write its full path in mosh-server command.
  4. Connect.

The same with the Mosh command line:

mosh --server=/usr/local/bin/mosh-server deploy@203.0.113.10

Local echo

Under Local echo, choose when the app shows your typing before the server confirms it:

  • On a slow connection, the default: only when the delay is noticeable.
  • Always.
  • Never.

Text not yet confirmed is underlined. If the server shows something else, the app takes it back.

Good to know

  • Mosh always uses UTF-8: the character set of a server applies when Mosh is off.
  • While the server cannot be reached, a bar says how long it has been and Mosh keeps trying.

To keep programs running after you close the app, see Keep sessions alive. More on the Mosh page. Something does not work? See Mosh does not start.