How do I setup Mosh server access?

We found that Mosh doesn’t handle host urls. We suggest using the Desktop Application for connections since will generate a new proxy url that you will need to resolve to an IP address each time. The desktop urls will always resolve to localhost (

Additionally, the server kills itself once the client exits, therefore you need to fetch new key every time you want to connect, which is a real pain. “man mosh-server”: mosh-server exits when the client terminates the connection.
Here are the steps for set up.

For example if the username is pi and the SSH connection port from the Desktop Application is 33007

ssh pi@ -p 33007 "mosh-server new -s -p 60001" > /dev/stdout | grep -e "MOSH CONNECT" | awk '{print $2}'
  • Connect with mosh, for example the port for the Remote.It Mosh UDP connection is 33006
 MOSH_KEY=XXXX mosh-client 33006

You then can create a script for ease and to connect faster, where you specify both ssh and mosh ports for Linux. If you are using Windows, this would need to be translated for use, likely using Chrome. Unfortunately we will not be able to help with Windows.

Pass in $1 and $2 with the Remote.It connection ports where $1 is the SSH port and $2 as the MOSH UDP port.

MOSH_KEY=$(ssh -l pi -p $1 "mosh-server new -s -p 60001" > /dev/stdout | grep -e "MOSH CONNECT" | awk '{print $2}')mosh-client $2