Skip directly to content

How to tunnel CVS over SSH

on Sun, 2009-02-08 01:54

This mini-HOWTO explains how to tunnel CVS by port forwarding with OpenSSH.

I’m developer at the Drupal shop NodeOne and have contributed several modules. I therefore access Drupals CVS server on regular basis. From time to time, I am behind a firewall that blocks the port 2401 used by CVS. To solve that, I setup port forwarding to tunnel the CVS protocol oveh SSH. This is how I do:

Setup an SSH tunnel to listen at 2401 on my machine, the localhost, which is behind the firewall, and forward to another machine, here called openhost, that has CVS access through 2401:

localhost> ssh -L 2401:localhost:2401 tbarregren@openhost

Setup an SSH tunnel to listen at 2401 on openhost and forward to the Drupal CVS server:

openhost> ssh -L 2401:cvs.drupal.org:2401 localhost

Login on Drupal’s CVS server:

localhost> export CVSROOT=:pserver:tbarregren@localhost:/cvs/drupal-contrib && cvs login

Do the usual stuff.

Post new comment