mobile-shell / mosh

Mobile Shell
https://mosh.org
GNU General Public License v3.0
12.7k stars 743 forks source link

/usr/bin/mosh: Did not find mosh server startup message, mosh is available in path #1291

Closed Nikola-Milovic closed 1 year ago

Nikola-Milovic commented 1 year ago

Hello everyone, I have installed mosh both on my server and my client, and they seem to be working fine, but when I try to connect remotely it just doesn't work. It says that the server is not in the bin, but from the output of the logs below I think it is

> nikola@nikola-laptop:~/.ssh$ ssh nikolahome
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-79-generic x86_64)
Last login: Tue Aug 29 07:47:34 2023 from 111.111.111.111(redacted)
Cannot open display "default display"
Agent pid 29861
Identity added: /home/nikola/.ssh/id_ed25519.github (email@gmail.com)

> nikola@nikola-B450M-DS3H:~$ exit
logout
Connection to 111.111.111.222(redacted) closed.

> nikola@nikola-laptop:~/.ssh$ mosh -p 60000 --ssh="ssh nikolahome" nikola@111.111.111.222(redacted)
bash: line 1: nikola@111.111.111.222(redacted): command not found
Connection to 111.111.111.222(redacted) closed.
/usr/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

> nikola@nikola-laptop:~/.ssh$ mosh -p 60000 --ssh="ssh nikolahome" nikola@111.111.111.222(redacted)
bash: line 1: nikola@111.111.111.222: command not found
Connection to 111.111.111.222 closed.
/usr/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

> nikola@nikola-laptop:~/.ssh$ ssh nikolahome echo \$PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

> nikola@nikola-laptop:~/.ssh$ ssh nikolahome /usr/bin/which mosh-server
/usr/bin/mosh-server
achernya commented 1 year ago

That is not how the --ssh arg is supposed to work. What happens if you run mosh nikola@nikolahome? Can you give more details about your setup? A copy of .ssh/config would be helpful.

Nikola-Milovic commented 1 year ago

Yeah mosh nikola@nikolahome works. It seems that I misunderstood the manpage, since I thought the --ssh specifies the ssh command and params executed to establish the ssh connection.