Mosh "Nothing received from server on UDP port 60001"
What the Mosh message "Nothing received from server on UDP port" means, which UDP ports to open on a firewall, NAT or cloud security group, and how to test.
mosh: Nothing received from server on UDP port 60001.
The Mosh client found mosh-server on the host through SSH, but no UDP packet got through between the two. The SSH part worked, so the SSH port is not the problem. Something on the way blocks UDP, or the server is not reachable on the UDP port it was given.
If you instead see "Did not find mosh server startup message", the server never started: see Mosh "Did not find mosh server startup message".
When you quit a session that never connected, mosh also prints:
mosh did not make a successful connection to 192.0.2.10:60001.
Please verify that UDP port 60001 is not firewalled and can reach the server.
Which ports
Mosh uses one free UDP port on the host for each session, in the range 60000 to 61000 by default. Per the Mosh manual, -p picks a specific port or range on the server:
mosh -p 60001 [email protected]
mosh -p 60001:60010 [email protected]
-p 0 lets the operating system choose any free UDP port. The option does not change the port SSH uses.
What to check
- Firewall on the host. Allow inbound UDP on the range. With only a few sessions at a time, a smaller range such as 60000 to 60010 is enough, as the Mosh FAQ says. On a Mac the firewall works per app; see Mosh to a Mac: Nothing received from server, macOS firewall.
- Cloud security group or network ACL. Open the same UDP range in the provider's console. An open SSH port does not open UDP.
- NAT or port forwarding. If you forwarded TCP port 22 to reach the host, forward the UDP ports as well, and use
-pto match what you forwarded. - A network that blocks UDP. Some guest, hotel or office networks do. Try another network, or use SSH instead: see Mosh or SSH?.
- Crash at start. The Mosh FAQ mentions a glibc 2.22 bug that made
mosh-servercrash at once. It was worked around in Mosh 1.2.6, so update Mosh on the host.
The FAQ suggests netstat, netcat, socat and tcpdump for finding where packets stop. Only the owner of the host or network can change these rules, so send them the UDP port from the message.
Related
- What Mosh needs on the host
- How Mosh works
- A detached Mosh session
- Mosh to a Mac: Nothing received from server, macOS firewall
- Mosh works on Wi-Fi but freezes or fails through a VPN: the MTU