I have installed mosh on my MacOS via brew. Everything went perfect.

After I tried to connect to my server, I got a message:

localhost:~ darkstaff$ mosh root@*.*.*.*
root@*.*.*.*'s password: 
bash: mosh-server: command not found
Connection to *.*.*.* closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

Do I have to install Mosh on my server? If so, how could I install?

I am using Debian.

  • 1
    Yes you do. see the faq. Look for a debian package called mosh. – meuh Jul 11 '18 at 9:40

Yeah. The client has to talk to something on the remote end. It uses SSH for the initial connection, but the idea of mosh is that it uses its own protocol, so it needs its own server program too.

I'd suggest also using screen or tmux with mosh, since if the client dies (e.g. you reboot your laptop), there's no way to reconnect to the running mosh session on the server.

apt-get install mosh screen

| improve this answer | |
  • May I know what is screen for in this case? – AGamePlayer Jul 11 '18 at 11:06
  • 1
    @AGamePlayer, it allows reattaching to the session if the client dies, like I said. Without it, anything you have running under mosh keeps running but is inaccessible if the client dies. (You don't need it if the network gets disconnected, just if the client process closes for any reason.) Also, you get multiple windows multiplexed in that one terminal. – ilkkachu Jul 11 '18 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.