The machine I’m working with right now is Debian 9, so I installed with apt, then make sure the port range is open for business:
sudo apt-get install -y mosh
sudo iptables -I INPUT 1 -p udp --dport 60000:61000 -j ACCEPT
sudo bash -c 'iptables-save > /etc/iptables/rules.v4'
In my case, I had to insert the rule (with
-I INPUT 1 ...) rather than append (with
-A INPUT ...) because the remote already has rules which seemed to conflict with mosh.