Strovent SystemsSign in
Reference

Mosh to a Mac: Nothing received from server, macOS firewall

SSH to a Mac works but Mosh says Nothing received from server: the macOS firewall blocks mosh-server. Add mosh-server under Firewall Options to allow it.

You can SSH into a Mac with Remote Login, but a Mosh connection to the same Mac waits and then reports:

mosh: Nothing received from server on UDP port 60001.

The SSH part worked: Mosh logged in and started mosh-server. The UDP packets from your device never reached it. When the Mac is the host, the usual block is the macOS firewall.

Why SSH gets through and Mosh does not

The macOS firewall decides per app, not per port. Apple notes that sharing services turned on in Sharing settings, such as Remote Login, can connect through the firewall. mosh-server is not built-in. It comes from Homebrew (brew install mosh), MacPorts or a package. With the firewall on, an app that is not on the allowed list can be blocked from receiving incoming connections, and then the server's UDP port never answers.

Allow mosh-server through the firewall

1. Find the program file. In Terminal on the Mac, run which mosh-server. With Homebrew on Apple silicon this prints /opt/homebrew/bin/mosh-server. Homebrew installs that as a symbolic link into its own folder, so run ls -l /opt/homebrew/bin/mosh-server to see the file it points to.

2. Open the firewall options. Choose Apple menu, then System Settings. Click Network, then Firewall, then Options.

3. Add the program. Click Add (+), and choose the mosh-server file. In the file dialog, press Shift-Command-G to type a folder path. Make sure it is set to allow incoming connections.

4. Connect again. Close any Mosh client still waiting and start a new connection.

Other firewall settings that block Mosh

  • Block all incoming connections. This allows only basic network services, so no app on the allowed list gets through. Mosh cannot work while it is on.
  • Allow downloaded signed software. This option lets apps signed by a valid certificate authority in automatically. If your mosh-server is not signed that way, it is not added, so add it by hand as above.

If it still fails

Sources

Spotted a mistake? Email [email protected].