Skip to main content
 

Mosh to cloudtop from laptop

Assumes:
- you have a jump host (existing ubiquity works fine)
- beyondcorp is disabled on laptop/jumphost

On jumphost
sudo apt-get install dtach

On laptop
ssh cloudtophost
echo
# copy the value of that environment variable
# create a new shell on your laptop and continue:
mosh --port=60000 jumphost
export SSH_AUTH_SOCK={pasted filename}
dtach -Ez -r winch -c ~/.cloudtop-session ssh cloudtophost
tmx # or screen or whatever you prefer

This setup leaves your mosh session active when putting the laptop to sleep, network changes, etc.

Every morning you will need to use go/auth-refresh to get fresh tokens.

If you have to reboot your laptop you can get back to your previous state by executing:

mosh --port=60000 jumphost
dtach -a ~/.cloudtop-session