When you install mosh with homebrew and if you try to connect to your computer, you will get an error message command not found mosh-server
it is because when installed with homebrew, when you ssh into the computer, the path to the mosh-server binary is not present in the PATH.
To solve this issue you just need to pass the –server parameter with the path to the mosh-server binary which in our case would be at /usr/local/bin/mosh-server
So in summary use the following command to connect to your mac via mosh
mosh --server='/usr/local/bin/mosh-server' <username>@<address_of_remote_server>
Example:
mosh --server='/usr/local/bin/mosh-server' mohammed@192.168.1.20
Leave a Reply