homebrew – “Command not discovered: mosh-server” when attempting to hook up with macOS server working mosh

[ad_1]

I am attempting to hook up with an M2 Mac mini with mosh.

Nevertheless, when connecting with mosh <hostname>, I get an error zsh:1: command not discovered: mosh-server:

$ mosh <username>@<hostname>                                     
(<username>@<hostname>) Password:
zsh:1: command not discovered: mosh-server
Connection to m2-mini.native closed.
/decide/homebrew/bin/mosh: Didn't discover mosh server startup message. (Have you ever put in mosh in your server?)

I positively have put in mosh on that server. After I ssh in, and run which mosh-server I get /decide/homebrew/bin/mosh-server:

<username>@<local_hostname> ~ % ssh <username>@<remote_hostname>
...
<username>@<remote_hostname> ~ % which mosh-server
/decide/homebrew/bin/mosh-server

A workaround is to run:

mosh [email protected] --server /decide/homebrew/bin/mosh-server

however this should not be needed?

Curiously, once I run a distant command with ssh -t, I get “mosh-server not discovered”:

<username>@<local_hostname> ~ % ssh [email protected] -t which mosh-server
(<username>@<remote_hostname) Password:
mosh-server not discovered
Connection to <remote_hostname> closed.

What is going on on right here?

Replace:

This may need to do one thing with the kind of shell that is loaded. I get for instance:

$ ssh <username>@<remote_hostname> -t 'echo $PATH'
/usr/bin:/bin:/usr/sbin:/sbin

[ad_2]

Leave a Reply

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