Last modified: 2014-10-17 09:17:34 UTC
ssh is quite painful over a slow and/or lossy connection. mosh uses ssh for authentication and then changes to it's own robust, udp based protocol. Quoting from the man page: mosh (mobile shell) is a remote terminal application that supports intermittent connectivity, allows roaming, and pro‐ vides speculative local echo and line editing of user keystrokes. Compared with ssh, mosh is more robust — its connections stay up across sleeps and changes in the client's IP address — and more responsive, because the protocol is tolerant of packet loss and the client can echo most keystrokes immedi‐ ately, without waiting for a network round-trip. mosh uses ssh to establish a connection to the remote host and authenticate with existing means (e.g., public-key authentication or a password). mosh executes the unprivileged mosh-server helper program on the server, then closes the SSH connection and starts the mosh-client, which establishes a long-lived datagram connection over UDP.
(In reply to comment #0) > ssh is quite painful over a slow and/or lossy connection. mosh uses ssh for > authentication and then changes to it's own robust, udp based protocol. Robust and udp in the same sentence sounds funny
Just found out that mosh already works for tools-login, just not for bastion. would still be nice to have that, too.
This is supported on tools, but adding it to the general bastions would be a good idea.
JFTR, on Tools mosh-server processes eat up to 25 MBytes RSS each; sshds usually are much lighter, even if you add screen. Labs bastions could certainly handle that but it's something to keep in mind.
*** Bug 49454 has been marked as a duplicate of this bug. ***
Change 84024 had a related patch set uploaded by Yuvipanda: Add mosh to bastion hosts https://gerrit.wikimedia.org/r/84024
https://gerrit.wikimedia.org/r/#/c/84024/ perhaps? Not sure if we need to open up any ports or just installing the package is enough?
Change 84024 merged by coren: Add mosh to bastion hosts https://gerrit.wikimedia.org/r/84024
Change 84105 had a related patch set uploaded by Yuvipanda: Add mosh to labs bastions https://gerrit.wikimedia.org/r/84105
Change 84105 merged by Akosiaris: Add mosh to labs bastions https://gerrit.wikimedia.org/r/84105
We now have mosh installed on the labs bastions (and Coren graciously opened up the relevant ports), and can mosh to the bastions! However.... Because of mosh's lack of support for proxycommand or equivalent, we can't really use bastions to access the rest of labs. So we can mosh to the bastion, and... that is pretty much it. Quite useless, IMO :(
mosh is indeed only reasonably useful for instances with a public IP: while you can proxycommand the mosh invocation itself, your local client won't be able to connect to the started mosh-server unless it is reachable.
Yeah, and you want mosh in client -> bastion, since that is the flaky part. If you need mosh from bastion to target host, you've bigger problems...
I checked out http://mailman.mit.edu/pipermail/mosh-devel/2013-May/000499.html and that actually works! So either that gets merged, or we make a patched package. Hopefully the former :D
Considering we are dealing with keys, *definitely* the former!
Still not merged, so we can't really do much.