15

Mosh is an alternative to ssh that is generally more resilient. In particular, it can deal with:

  • Extreme packet loss
  • Changing client IPs
  • Temporary connection loss

There are few downsides to using it, other than a lack of X11 forwarding, which TRAMP does not use.

It would be great if we could get emacs to work with it, as it could potentially make TRAMP much more stable in unstable environments.

Some work has already been done to work towards this, but nothing has worked yet.

PythonNut
  • 10,243
  • 2
  • 29
  • 75

2 Answers2

13

This cannot be done without some changes to mosh.

Unlike ssh, mosh doesn't transmit every character that is sent by the application — it will happily skip sending data that has already scrolled off-screen, and will omit data that has been overwritten by later screen updates over high-RTT links. Therefore, it cannot be easily used for automation.

There has been some talk on the mosh mailing list about adding a reliable command channel to the mosh protocol, but I'm not sure if anything has come out of it.

jch
  • 5,680
  • 22
  • 39
8

I've asked on the mosh ML list for support, see http://thread.gmane.org/gmane.network.mosh.devel/112. The answer was "this is not going to happen any time soon".

Michael Albinus
  • 6,647
  • 14
  • 20
  • 4
    Btw, if people are lobbying on the mosh ML for a scripting extension, I would be more than happy to add this as additional method to Tramp when possible. – Michael Albinus Dec 19 '14 at 08:52