I’m at a conference, I have my ChromeBook (vanilla, no local linux installs or any such thing), I have internet and I’ve set up a VM out there in the cloud,
I’m regularly closing my laptop and wondering between talks, so it would be handy to be able to resume my ssh session without having to restart and without having to type “screen -r” every time.
My ChromeBook ssh client doesn’t let me set up a “ssh here and run this command” so instead, given that I’m only logging into my VM with a single session at a time I can add this to the end of my ~/.bashrc file:
# If STY has not been set (which screen # does). Either detach and connect to the # main screen session, or create one first # if the screen session is missing. if [ -z "$STY" ]; then screen -dR PyCon-AU fi
Problem solved, one technical distraction from the business of enjoying the conference down.
For the record, it works at music festivals as well…
One needs to hack on the odd occasion – there’s no GUI function available at this time to handle the “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!” case when a server host key changes.
This is supported under the hood via javascript – these instructions were most helpful:
https://www.gaggl.com/2015/07/chromeos-removing-ssh-known_hosts-from-chromebook/
To summarise that article:
Find the index of the offending key in the message:
“Offending ECDSA key in /.ssh/known_hosts:23”
Open a javascript console for the “Secure Shell” by selecting that window and pressing Ctrl-Shift-j.
Then delete the known key using:
term_.command.removeKnownHostByIndex(INDEX);