Chapter 4: Working Remotely from Outside the College

Automatically connecting to a free machine

face Josiah Wang Tom Crossland

Don’t want to use your brainpower to find a free machine?

When you’re on one of the login nodes, you can also run a script to automatically find and SSH into a free lab machine. The script is located at /vol/linux/bin/sshtolab, and can be run like so:

username@vm-shell1:~$ /vol/linux/bin/sshtolab
username@texel13:~$ ls

Once you’re done, you can logout and return to the login node with logout, as before:

username@texel13:~$ logout
username@shell2:~$

From a command line (Linux, macOS, or WSL), you can enter the following to SSH to a login node and immediately run the sshtolab script, all in one line:

name@HOME:~$ ssh -t USERNAME@shell5.doc.ic.ac.uk /vol/linux/bin/sshtolab 

And there you have it!