0

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?

rlbond
  • 181
  • 1
  • 10

1 Answers1

3

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

radius
  • 9,633
  • 25
  • 45
  • 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