HowTo: subversion over an SSH so. cks proxy

Print Friendly, PDF & Email

Something I’ve discovered that’s useful for remote working on our restricted access svn repos. We commonly use SSH SOCKS 5 proxies as detailed before on this blog and elsewhere. Due to the fact that svn doesn’t speak SOCKS the config options in ~/.subversion/servers don’t work. The proxychains command can facilitate this by redirecting all tcp traffic via a defined proxy. First install the package (it’s in the debian repos)

sudo aptitude install proxychains

Then configure the command with your local SSH proxy:
DynamicChain
tcp_read_time_out 15000
tcp_connect_time_out 10000
[ProxyList]
socks5 127.0.0.1 8080

Then run up the SSH tunnel

ssh -D 8080 shell.ilrt.bris.ac.uk

And finally the svn command via the proxychains command:

$ proxychains svn commit -m'doing some stuff'
ProxyChains-3.1 (http://proxychains.sf.net)
|D-chain|-<>-127.0.0.1:8080-<><>-137.222.16.118:443-<><>-OK
Sending        something
Transmitting file data .
Committed revision 1234.