#686956 mosh is incompatible with sslh

Package:
mosh
Source:
mosh
Description:
Mobile shell that supports roaming and intelligent local echo
Submitter:
chrysn
Date:
2022-06-28 01:42:03 UTC
Severity:
minor
#686956#5
Date:
2012-09-07 16:12:12 UTC
From:
To:
mosh can't be used on hosts that hide their ssh services behind sslh.

when connecting to such a host, mosh displays

then:

the problem seems to be caused by the way the ssh connection is
established in sslh: sslh forwards the connection by creating another
tcp stream from itself to the ssh server, causing SSH_CONNECTION have
"127.0.0.1" in both source and destination ip fields -- and mosh, when
started with -s, binds to the address it finds in SSH_CONNECTION.

the mosh server seems to get started with -s automatically (even though
the client seems to just call "mosh-server", it shows up in the process
list as `mosh-server new -s ...`).


several solutions seem feasible, in increasing order of my preference:

* provide a way for the client to specify he doesn't want to use the
  `-s` option server-side (fix on mosh side)
* have a server-side configuration option to turn off the `-s` flag for
  the host (better, as it has to be done only once per host) (fix on
  mosh side)
* provide a way to find out the real address (fix on ssh side)


as a workaround, i have provided a way around sslh for clients to
connect directly, but that's not usually what an sslh user wants to do.

#686956#12
Date:
2013-04-30 14:05:21 UTC
From:
To:
This is fixed in git (adding a new mosh option, --bind-server=ANY) and
will be in the next release.

#686956#21
Date:
2015-07-19 19:08:59 UTC
From:
To:
reassign 686956 mosh
fixed 686956 1.2.4.95rc2-1
thanks

Hi,

I'm reassigning this bug only to mosh and document the version which
include the binding option.