Troubleshooting

Why does Mosh not start?

Fix Mosh in Wardterm: install mosh-server, give it a UTF-8 locale, open the UDP ports 60000 to 61000 and set the mosh-server command when needed.

What you see

One of these messages, in place of the session:

mosh-server is not installed on this server. Install the mosh package there (for example: sudo apt install mosh), or turn Mosh off for this server
mosh-server needs a UTF-8 locale on the server (for example en_US.UTF-8 or C.UTF-8)
mosh-server did not start: ...
could not reach 203.0.113.10 over UDP: ...

When the server uses a proxy: Mosh cannot go through a proxy. Turn off Mosh or the proxy for this server.

During a session, a bar can say No contact with the server for 12 s. Mosh keeps trying.

Why it happens

Mosh signs in over SSH, starts mosh-server on the server, then talks to it over UDP. Each step needs something on the server: the program, a UTF-8 locale, and an open UDP port.

What to do

  1. Install Mosh on the server. On Debian or Ubuntu:
    sudo apt install mosh
    On Fedora or Rocky Linux:
    sudo dnf install mosh
  2. Give the server a UTF-8 locale:
    locale -a | grep -i utf
    sudo locale-gen en_US.UTF-8
  3. Open the UDP ports Mosh uses, on the server and in your provider's firewall:
    sudo ufw allow 60000:61000/udp
  4. If mosh-server is installed in a folder that is not on the path, write its full path in the server's mosh-server command, for example /usr/local/bin/mosh-server.
  5. If the bar about no contact stays, the network blocks UDP. Try another network, or turn Mosh off for that server and use SSH.

The same start by hand, from a computer with Mosh:

mosh --ssh="ssh -p 22" deploy@203.0.113.10

More in Mosh.