How to setup mosh on fresh linux machine

A short guide on how to setup mosh on Lightsail or Hetzner server

  • Install mosh package on the server sudo apt install mosh
  • Run locale-gen en_US.UTF-8 && update-locale LC_ALL="en_US.UTF-8"
  • Open UDP ports 60000 - 61000 on the firewall

Test your connection by running replacing ssh command with mosh instead.

ssh root@yourdomain.com

with

mosh root@yourdomain.com