[aklug] Re: resuming borked sessions

From: Shane Spencer <shane@bogomip.com>
Date: Mon Feb 24 2014 - 08:59:39 AKST

I use mosh primarily over SSH for console sessions now. No timeout
issues.. predictive typing.. collapsing of screen updates into single
packets.

I work from my office in Anchorage and shell into a server in Fairbanks for
more than half of my time. Typically this wouldn't be an issue however I
have 0 control of the Fairbanks network and it is often at 90 to 100%
capacity which can easily squish a few connections due to timeouts or loss.

My only gotcha here is that I still haven't invested the time to have
urxvt's key commands not overlap mosh's or the other way around. I usually
just kill the window.

I couple Mosh with OpenSSH's ControlMaster and ControlPersist settings to
help quickly set up the initial SSH requirement before it drops everything
to UDP.

Mosh is for shells. It doesn't do redirection of ports or anything else.
 I wouldn't consider it a one trick pony however.. the trick is phenomenal
and unparalleled.

As for TCP connection state and forwarding.. there was a tool called rock
way back in the day that attempted to handle this. It would unfortunately
do so by completely hijacking the socket library. It showed off quite a
few things the expectations that TCP communications provides that you just
can't have any one thing just magically take care of. The biggest being
you can keep a TCP session alive (via a proxy) but the application layer
probably has some reasonable timeouts.. not everything is event driven any
always simply waiting for data.

SSH will time out via a proxy even if the proxy keeps the TCP connection
alive. There are keepalives, ping intervals. All of which you can
disable.. but eventually you will have an inconsistent state. HTTP would
be similar, where you can't control what the remote side will consider a
dead connection. Given the state of the HTTP work being done since the
dawn of the Internet.. if you had a solution for this you'd be hijacking an
available thread on a web server for hours and that just ain't cool dog.

Mosh avoids this by directly addressing it in its connection design.

- Shane

On Mon, Feb 24, 2014 at 6:24 AM, Royce Williams <royce@tycho.org> wrote:

> On Mon, Feb 24, 2014 at 6:14 AM, Royce Williams <royce@tycho.org> wrote:
>
> >> Try Mosh.
>
> Sorry to keep spamming the list, but the more I read about this, the
> cooler it gets.
>
> It actually uses SSH to connect to a remote server, fires up the
> mosh-server user process (no daemon or root access required!), and
> then your connection rides mosh after that.
>
> Installing it is super easy; here are one-liner install instructions
> for most Unix-likes:
>
> http://mosh.mit.edu/#getting
>
> There are some drawbacks (no X11 forwarding yet, but on the roadmap)
> ... but I just convinced myself to actually set it up and start
> testing it.
>
> Royce
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Feb 24 09:00:10 2014

This archive was generated by hypermail 2.1.8 : Mon Feb 24 2014 - 09:00:10 AKST