The macOS firewall has a bug where it will block connections that you explicitly allowed for a given program, if said program is added as a symlink.
If you are getting Nothing received from port XXXXX
when connecting to your Mac via mosh, this solution is for you!
The fix_mosh_server.sh
script goes in your user directory.
The fix_mosh_server.plist
file goes in /Library/LaunchDaemons/
. Once created, give it the proper permissions:
sudo chown root:wheel /Library/LaunchDaemons/fix_mosh_server.plist
sudo chmod 644 /Library/LaunchDaemons/fix_mosh_server.plist
Then load it:
sudo launchctl load /Library/LaunchDaemons/fix_mosh_server.plist