Difference between revisions of "Using mosh to avoid losing ssh connections"
(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...") |
(Tag: Visual edit) |
||
Line 4: | Line 4: | ||
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: | 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 | |
− | 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! | (or other nodes). Try unplugging your PC from the network, wait a minute and connect back. The connection stays! | ||
NOTES | NOTES | ||
− | 1) on | + | 1) '''on your''' '''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 | |
− | export LANG=en_US.UTF-8 | ||
− | |||
Some people report having to add this as well: | Some people report having to add this as well: | ||
− | + | export LC_CTYPE=en_US.UTF-8 | |
− | 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! | 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! |
Revision as of 15:09, 14 September 2015
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:
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 your 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!