You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by John Peacock <jp...@rowman.com> on 2004/05/18 17:28:06 UTC

Yet another svn and ssh methodology

Last night, I wanted to do a little work on a server which is too slow and old 
(Cobalt RaQ-3 upgraded to 550 software) to really justify installing the entire 
suite of files necessary to run Subversion locally.  So I built just the client 
and then I had to decide how I would connect to a repository.

I had just set up another much more powerful server (Quad Xeon/2GB RAM), with an 
svnserve instance running on the loopback interface.  I've decided I'm not going 
to use file:// any more if I can help it, and I didn't want to load the DAV 
module.  I am only storing local apps in the repository, so I don't need any 
network access.

But, how could I use that repository from some other box?  Easy - ssh port 
tunneling!  The following recipe shows one way to do this.  "xeon" is the big 
box containing the repository and svnserve process and "cobalt" is the 
client-only box.

[xeon]$ ssh -R 3690:127.0.0.1:3690 cobalt
user@cobalts's password: xxxxxxxx

[cobalt]$ svn ls svn://user@localhost/
Project1/
Project2/
Project3/
...

There are several advantages to this style:

1) Only a single session is required; some of the other ways of setting up 
tunnels wind up requiring two sessions (one for SSH and one to work in);

2) The port is available until the session ends; I wound up su'ing to some other 
account, yet could still use the connection (by specifying the username);

3) If you are already using ssh to connect to the remote machine, you can just 
piggyback your svn traffic on the same connection.

I hope this helps someone; I'll try and write up a FAQ entry if it seems useful 
to people...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Yet another svn and ssh methodology

Posted by John Peacock <jp...@rowman.com>.
Ben Collins-Sussman wrote:

> I think we already have a FAQ on ssh tunneling:
> 
> http://subversion.tigris.org/project_faq.html#paranoid
> 
> 

Yes, but that describes a local ('-L') http:// tunnel.  I'd obviously use that 
as the basis for my version.  I like the compactness of using the same ssh 
session for both the port-forward and terminal session.  I also think that it is 
valuable to show that both http:// and svn:// can be tunneled in the same fashion.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Yet another svn and ssh methodology

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-05-18 at 12:28, John Peacock wrote:

> I hope this helps someone; I'll try and write up a FAQ entry if it seems useful 
> to people...

I think we already have a FAQ on ssh tunneling:

http://subversion.tigris.org/project_faq.html#paranoid



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org