• Install Mosh on both ends
  • allow udp access for mosh on the server (the example is for the ufw firewall)
sudo ufw allow 60000:61000/udp

  • connect like normal.
  • if using a different port do this
mosh user@domain.com --ssh="ssh -p 2222"