Alan McKinnon writes:

> I need to get to the work CVS server from home. It's not exposed to the 
> internet but never fear! we have ssh -L and a convenient sshd host that is on 
> the internets. So, locally
> 
> ssh -Llocalhost:1111:cvs.example.com:22 a...@gateway.example.com
> 
> and tell cvs that the server is localhost:1111
> 
> I do this all the time for lots of other stuff. Doesn't work for CVS because 
> there's no way to tell cvs to tell ssh what port to use. 
> 
> Google gives lots of hits about using the host-specific Host directive in 
> ~/.ssh/config but that won't work for me - it assumes I can see the CVS 
> server 
> directly and doesn't take into account that I have port forwarding in the way.
> 
> Anyone know a way to get cvs to use any port other than 22? I'm receptive to 
> alternate cvs clients with this support, just not ones that tweak ssh to do 
> it.

Hmm, I don't get it. Why would this .ssh/config not work?

Host gateway
        Hostname     gateway.example.com
        User         alan
        LocalForward 1111 cvs.example.com:22
        
Host cvs
        Hostname     localhost
        Port         1111
        User         alan

You log in at gateway first, and during that session you can access the
CVS server with 'ssh cvs', or use CVS via CVSROOT=:ext:cvs:/var/cvs.
Can't you?

        Wonko

Reply via email to