Easy transparent SSH tunnels28 Feb 2016
Most of my development work is done on remote computing clusters, which are usually firewalled.
This means I can’t log in directly when I work from home. I have to log into a network machine, and then log in to my development machine from there.
It gets kind of tedious to keep doing something along the lines of
It also makes it a pain to copy files from home to the remote machine (and vice versa!).
However, you can easily set up a transparent tunnel through your network-host that lets you (effectively) log on to your development machine as if it weren’t even firewalled.
Just open up (or create)
Add the following lines (replacing
development-machine with the names of your computers). You can name them whatever you want. Here I named each machine
What this does is log you into the non-firewalled network-host, then establish a connection to the firewalled computer through
nc in this case). You never actually see the network host, it acts on your behalf, invisibly in the background.
So, from your home computer, you can login directly to the development machine:
You can also
scp directly from your development machine now, too.