Disclaimer: this entry is mainly a reminder to myself (the stuff you would write on a post-it), but maybe it's useful to someone else.
The subversion server at my work is (currently) only accessible from within the LAN, which is, of course, separated with a firewall from the evil internet. This makes it a bit difficult to access the subversion server when working from home. SSH Tunneling to the rescue!
To setup an SSH tunnel (on computer
ssh -l username -L 8910:svnserver:80 gateway cat -
This creates an SSH connection from computer
home to computer
gateway and opens a listening TCP-port 8910 on the the computer
home. Connections to this port will be forwarded through the SSH tunnel to TCP-port 80 from computer
svnserver (as seen from computer
Now we can access the svnserver as follows (on computer
svn co http://localhost:8910/svn/repository/path
In a nice diagram:
Graphics used in diagram from Tango icon gallery.