info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using CVS through an SSH tunnel.


From: ari gold
Subject: Re: Using CVS through an SSH tunnel.
Date: Tue, 28 Nov 2000 10:50:00 -0500

im not sure if this can help you but i have a nice little system working
here...

have you tried setting up ssh with public and private keys?  and using
ssh-agent and ssh-add (actually i use, ssh-agent2 and ssh-add2.. newer
version).  basically the routine is:

in ~/.ssh2 create a private and public key pair with ssh-keygen2.  you will
be asked for a passphrase (password)
sftp the public key over to where the cvs repository sits.  put in in
~/.ssh2
create two files, one on the cvs server in ~/.ssh2 and one in your home
directory in ~/.ssh2
    in cvs server in ~/.ssh2 create file "authorization" with the text "key
id_dsa_1024_a.pub" where *.pub is the name of the public key you created
    in home directory in ~/.ssh2 create file "identification" with the text
"idkey id_dsa_1024_a" where id_dsa... is the name of the private key
run ssh-agent2 in your home location
BE SURE to set those environment variables it sends out.. in fact, save them
to a file for further use
run ssh-add2.. add your passphrase.. this is the only time you'll need it.
that is.. you should be able to run cvs commands securly (ssh2) without
having to type the password in every time.  great for scripting.

i'd read the man pages for ssh-agent too.. its important to understand how
it works.. basically its a backround process.  you want all shells to
inherit (ie. "have exported to them") those environment processes it spits
out.  best thing to do - run X as a subprocess under ssh-agent2..

any question?

best of luck
~ari


----- Original Message -----
From: "Nathan Field" <address@hidden>
To: <address@hidden>
Sent: Monday, November 27, 2000 10:24 PM
Subject: Using CVS through an SSH tunnel.


> I'm trying to get CVS to work through a tunnel into my companies work. I
> have set up an ssh tunnel from my own machine with this command:
>
> ssh -L 20000:server:22 firewall
>
> This sets up port 20000 on my local machine as a tunnel to port 22 on the
> server machine. No problem there. Now I try to setup CVS to use this
> tunnel to do a CVS checkout.
> CVS_RSH=ssh
> CVSROOT=:ext:localhost:/repository
>
> Ack, but wait, how do I tell ssh to use port 20000? Perhaps if I set
> CVS_RSH differently:
>
> $ export CVS_RSH="ssh -p 20000"
> $ cvs co bin/scripts
> cvs [checkout aborted]: cannot exec ssh -p 20000: No such file or
> directory
> cvs [checkout aborted]: end of file from server (consult above messages if
> any)
>
> I can get this to work if I kill my local ssh daemon, and issue the
> tunneling command as root with the local port set to 22, but this is not a
> practical solution. I looked through the info pages and found a couple of
> promising environment variables, but setting either of these to 20000
> didn't help.
> CVS_CLIENT_PORT: for Kerberos authentication
> CVS_RCMD_PORT: Currently not used for Unix clients
>
> Does anyone know how to make this work? It seems like there needs to be a
> CVS_RSH_OPTIONS environment variable or something like that.
>
> Thanks for any help,
>
> nathan
>
> ------------
> Nathan Field  Root is not something to be shared with strangers.
>
> When he awoke, he asked: "Was I before Chang Tzu who dreamt about being a
> butterfly, or am I now a butterfly who dreams about being Chuang Tzu?"
>         -- Chuang Tzu
>
>
>
> _______________________________________________
> Info-cvs mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/info-cvs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]