How to configure TortoiseSVN --> SSH Server --> SVN Server

Client: Windows Vista
SSH Server: Linux
SVN Server: FreeBSD

When I use the "Repo Browser" in TortoiseSVN on the client, I am challenged for a username and password (as intended) but it always fails with the following error:

-----
OPTIONS of 'http://localhost/<path to my repo>': authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)
-----

Before using TortoiseSVN I make a connection using putty to the SSH Server, which has 3 tunnels set up:

L 80:localhost:80 <ip_address_of_SVN_Server>
L 443:localhost:443 <ip_address_of_SVN_Server>
L 3690:localhost:3690 <ip_address_of_SVN_Server>

I know *something* is working because without the tunnels I can't even see my repo - but with them (providing I give the correct path) I'm at least getting challenged.  As you'll see in the question title, my topology is:

TortoiseSVN on Vista (with tunnels to SSH Server) --> SSH Server --> SVN Server

Any help would be appreciated.

Many thanks,
Steve
LVL 9
sda100Asked:
Who is Participating?
 
sda100Author Commented:
Sorry for the lack of a reply for so long.. the problem was the wrong username/password.  Elementary mistake!!  On a side note, the only tunnelled port I needed was L:12345 --> remote:80

Steve
0
 
karlwilburCommented:
Rather than use the "http" protocol try "svn+ssh"

So the repo URL would be:

svn+ssh://<username>@<ip_address_of_SVN_Server>:<ssh_port>/<path_to_repo>/


the port can be omitted if it is the SSH default (port 22).
0
 
sda100Author Commented:
Do I keep my existing tunnel setings because the SVN Server isn't directly visible from the outside word, hence the need to the SSH Server in the middle.

Steve :)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
karlwilburCommented:
Also, to shead a little more light on what may be happening with you current config:

Can you access SVN via HTTP on the other side of the SSH server? by accessing the SVN server directly via HTTP?

"TortoiseSVN on Vista (with tunnels to SSH Server) --> SSH Server --> SVN Server"
                                                                      from this network?    ----^

Maybe the SVN server is not set up to server SVN content via HTTP. Maybe the HTTP server on the SVN server machine is not implementing Basic Auth. Are you using Apache on the FreeBSD box?  Is Basic auth set up for that host?

I still think that direct ssh access to the SVN server seems the way to go, but is not, tell me a little more about the FreeBSD box's HTTP server (the box hosting the SVN server).
0
 
karlwilburCommented:
No, you would need to ssh directly to the FreeBSD box.

You could try this (assuming that SSH is running on the FreeBSD box adnd that you have an account there):
L 2222:<ip_address_of_SVN_Server>:22 <ip_address_of_SSH_Server>

svn+ssh://<SSH_username_on_SVN_server>@localhost:2222/<path_to_repo>/
0
 
karlwilburCommented:
Looking at your tunnels again, it seems that they were set up wrong. You have:

L 80:localhost:80 <ip_address_of_SVN_Server>
L 443:localhost:443 <ip_address_of_SVN_Server>
L 3690:localhost:3690 <ip_address_of_SVN_Server>


But shouldn't it be:
L 80:<ip_address_of_SVN_Server>:80 <ip_address_of_SSH_Server>
L 443:<ip_address_of_SVN_Server>:443 <ip_address_of_SSH_Server>
L 3690:<ip_address_of_SVN_Server>:3690 <ip_address_of_SSH_Server>
0
 
sda100Author Commented:
Yes, I normally use HTTP access to the SVN Server from the internal network.

I am running Apache on the FreeBSD box, and the SVN stuff is part of a 'trac' installation.  Authentication is handled like this (some information omitted):

<Location /trac>
        etc...
        AuthLDAPBindDN "cn=..."
        Require ldap-group cn=TracUsers,ou=Groups,dc=..."
</Location>
As I said, it all works from the internal network (containing SSH and SVN servers).

Is there any kind of reverse tunnelling that I need to set up on the SSH server?

Cheers,
Steve :)
0
 
sda100Author Commented:
Ah, my tunnels... I just listed them like that to show you my putty config.  To put in English, I was trying to create a tunnel from my client PC to the SVN server as I only have port 22 to work with on the SSH server.

Steve :)
0
 
karlwilburCommented:
Is there any kind of reverse tunnelling that I need to set up on the SSH server?
No.

I noticed that you are forwarding 443. Are you using HTTPS? If so, that is going to cause trouble trying to tunnel with HTTPS since the ip/domain names won't match....you might have to just drop the SSL on the HTTP and fall back to SSH only for encryption.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.