[mosh-users] Mosh on long job, disconnected?

C.v.St. stucki-spam at t-online.de
Sun Aug 20 16:37:59 EDT 2017



Am 20.08.2017 um 20:43 schrieb Boyan Penkov:

> start at home, close my laptop and get on the train, do my commute
...
> in the mosh session will continue to run on the remote machine.

This works fairly well, and I this commuting through Berlin.

BUT, if you loose the 'mosh client process', which is the only
instance to connect to your running session, this 'session' is
definitely lost and dead, even if the programs in it stay
alive for a while.  Also, if your program's output is more
than the buffers between program and mosh-server hold, the
program(job) will be stopped waiting for mosh.

So it is nearly always better, to run such a job under
a tty multiplexer like screen or tmux, which can 'freshly'
be reconnected, after loosing its input.  The luxury of
keeping the login running by mosh is still there, and
you gain security and more Scrollback-Buffer in sessions.
(Especially if a laptop switches of by empty battery :-)

With screen you can even look into the same job from
*multiple* logins! (I do this to telework and see the
same window on workplace and at home, locally by ssh,
remotely by mosh for roaming and 'surviving' the
nightly enforced IP-Change at home).

Yours  Stucki

Yours Stucki


More information about the mosh-users mailing list