Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I have an issue.

At my school (Georgia Tech), to remotely access our lab computers we have to use an SSH tunnel. It looks like

ssh -L 33389:PCNAME:3389 -l USERNAME

Now, I want to be able to use svn to access my lab PC (PCNAME), but I want to use apache to log in. Is there a way to establish an SSH tunnel to PCNAME, but then access the HTTP interface for svn? Or am I stuck and need to stick to svnserve?

share|improve this question
up vote 3 down vote accepted

Yes just add a new redirection to your HTTP server port (I assume it runs on port 80)

ssh -L 8080:PCNAME:80 -L 33389:PCNAME:3389 -l USERNAME 

Then setup your local svn rep to use localhost:8080 as server

share|improve this answer
Wow, I didn't know it was that easy! – rlbond Jun 22 '10 at 19:08
The trick is in the port numbers surrounding PCNAME. The left side is the port you will talk locally on (through PCNAME and the right port number reflect the destination, as seen by the machine you’re connecting into. Your original port forward is taking the traffic your local machine sends out through port 33389, passing it through the SSH tunnel, and is sending that traffic out to PCNAME on port 3389. Confused yet? :) – peelman Jun 22 '10 at 22:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.