Monday, December 13, 2010

SSH tunneling to access svn repository hidden behind a firewall.

Let's assume you have a repository link like:

https://<repositoryhost>/<reponame>

and you cannot access the <repositoryhost> directly but you can access the <repositoryhost> from the <proxyhost>

On the client's machine do:

ssh -Nf -L443:<repositoryhost>:443 <username>@<proxyhost>

The -Nf is optional - but it forces ssh to not create an interactive session but only do the port forwarding.

Then you can check out you repository using:

svn co https://localhost/<reponame>

If your repository link doesn't start with https:// you need to change 443 to another port number when doing the ssh.

Default ports by protocol:
  • https:// port 443
  • svn:// port 3980
  • http:// port 80
  • ssh+svn:// port 22

2 comments:

  1. FYI: SVN port is 3690.

    ReplyDelete
  2. Best Casinos Near Carson City, CA - Mapyro
    Find the best casinos near Carson City, CA near Yosemite National Park. Mapyro users can check back as 통영 출장샵 they 경주 출장마사지 play in the 거제 출장안마 newly 보령 출장안마 renovated and expanded 성남 출장샵

    ReplyDelete