Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 SERVER.gatech.edu

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

1 Answer 1

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 SERVER.gatech.edu 

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
1  
The trick is in the port numbers surrounding PCNAME. The left side is the port you will talk locally on (through 127.0.0.1). 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 SERVER.gatech.edu is sending that traffic out to PCNAME on port 3389. Confused yet? :) –  peelman Jun 22 '10 at 22:53

Your Answer

 
discard

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.