Darren Mothersele

London based Drupal Web Developer
Facebook Twitter Drupal.org LinkedIn RSS Feed

Access Drupal CVS from behind a firewall using SSH tunnelling

Working behind a firewall and need to get an up-to-date dev version of a Drupal module from the Drupal CVS? I was just stuck with this problem, but here's how I solved it.

Luckily, port 22 was open for ssh connection, so I tunnel the CVS traffic (port 2401) via my own server. Simple two step process:

1. Create an SSH connection in the background to your own server using the following command. Replace example.com with your host name and username with your ssh login name.

ssh -f -L 2401:cvs.drupal.org:2401 username@example.com -N

After this command you will have localhost:2401 mapping to cvs.drupal.org:2401 but via your SSH tunnel.

2. Run the usual Drupal CVS command, but replace localhost as the server. For example, to check out the most recent version of the date module:

cvs -z6 -d:pserver:anonymous:anonymous@localhost:/cvs/drupal-contrib \
checkout -d date-DRUPAL-6--2 -r DRUPAL-6--2 contributions/modules/date/

That's it!

proxy over ssh

Another useful SSH command is to use its internal SOCKS proxy to securely tunnel traffic:

ssh -D 6666 login@host.com

Then set firefox to use SOCKS proxy with values "localhost" and port 6666

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Recent comments

Latest Posts