0

What's the best way to do a svn commit over reverse ssh?

Typically when using svn we access it over svn+ssh, but I have an instance where the box making the modifications can't ssh into the svn server, BUT the reverse isn't true, the svn server can ssh into the change box. So what I would really like to do is be on the svn server and tell it to remotely connect, add files, and commit.

The only way I have thought of to do this would be to ssh from svn server to the change box opening a tunnel for ssh, and then use svn+ssh tunneled through the first connection which seems overly complicated.

Is there a better way to do a reverse connection through SSH?

The svn server is FreeBSD while the change box is OpenSuse. I could put in a request to open s hole in the firewall; in consider all requests a natural question is if this is necessary and what are the alternatives and their associated level of pain

1 Answer 1

1

One possibility is to start snvserve on the svn server, start a reverse tunnel from the svn server to the change box, then run svn on the change box as if it was talking to a local svnserve instance. The ssh setup would be

user@svnserver$ ssh -R 3690:localhost:3690 changebox 

The -R flag to ssh "specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side."

1
  • This is basically what I was doing; the start svnserve may be a tad different in that I start it per a typical ssh tunnel. Basically: 1. SSH to the svn server 2. From there ssh to the the change box, opening a remote tunnel (similar to the answer) 3. Run subversion, telling it to use svn+rssh where I define rash as ssh -p 2002 so that it connects to localhost 2002 ssh -t svnserver ssh -R 2002:localhost:22 changebox svn --non-interactive --config-option config:tunnels:rssh="ssh -p 2002" up Commented Jun 30, 2014 at 18:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.