Using Mosh with Mac when installed with homebrew

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>


mosh --server='/usr/local/bin/mosh-server' mohammed@






Leave a Reply

Your email address will not be published. Required fields are marked *