Enable `mosh`, the mobile-shell

Could you please permit us to use mosh the mobile shell https://mosh.org/ ?

Why we need this
Since we are still working from home, the network connections are often unreliable at home.
If I take a short break from terminal typing (or close my laptop lid for a minute) the ssh connection freezes and disconnects. Re creating ssh is easy in general, but when we are asked o do DUO twofactor authentication for every try (i.e. there is NO “remember me for one day” setting), it becomes easily frustrating.

I am able to install mosh via conda https://anaconda.org/conda-forge/mosh . But…

Mosh will log the user in via SSH, then start a connection on a UDP port between 60000 and 61000.

It looks like ports 60,000-61,000 are not open to public so mosh-client isnt able to talk to the mosh-server process.

Please help by enabling mosh usage on Endeavor cluster

@tnarayan Could you try adding ControlMaster to your SSH configuration? Add something like the following:

Host *.usc.edu
  ServerAliveInterval 30
  ServerAliveCountMax 4
  ControlMaster auto
  ControlPath ~/.ssh/%r@%h:%p
  ControlPersist 300s

That should let you log back in without password or Duo after being disconnected (up to 300s).

1 Like

Wow! Thanks x1000 !
ControlMaster is such a cool feature! It works like a charm.