Using mosh to avoid losing ssh connections

From mn/bio/cees-bioinf
Revision as of 15:08, 14 September 2015 by Alexajo@uio.no (talk | contribs) (Created page with "Sometimes, when you are logging in to a cod node or abel, and move your laptop to another room, or switch wifi network, or it went to sleep, you I lose the ssh connection. To...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sometimes, when you are logging in to a cod node or abel, and move your laptop to another room, or switch wifi network, or it went to sleep, you I lose the ssh connection. To prevent that from happening, you can try using - at least for mac and linux users the mosh program:

https://mosh.mit.edu/#

USIT has installed mosh on abel and the cod nodes. You need to install it on your PC/MAC and then run mosh instead of ssh:

mosh username@cod5.hpc.uio.no

(or other nodes). Try unplugging your PC from the network, wait a minute and connect back. The connection stays!

NOTES

1) on my Mac (NOT on abel or the cod nodes), you may had to add this line to my .bash_profile file:

export LANG=en_US.UTF-8

Some people report having to add this as well:

export LC_CTYPE=en_US.UTF-8

2) for Windows PCs, there is no version of mosh, but you can (apparently) use MobaXterm http://mobaxterm.mobatek.net/download-home-edition.html, or the chrome plugin (check https://mosh.mit.edu/#). If you get this to work, let us know!