Belgium

Auto SSH-Tunnel to a CVS repository with eclipse

Some of the software projects I’m involved in require access to a CVS repository which is behind a corporate firewall that will drop all incoming traffic which is not directed to a specific machine (the SSH server) on port 22. This situation made it hard to code from outside the organization’s network.

12

Some geekery would be to setup an SSH tunnel from the eclipse machine that would encrypt pserver while outside of the organization and forward it from the SSH server to the CVS server. This could be done by executing the following command:

ssh -L2401:cvs.example.org:2401 ssh.example.org

One would then configure eclipse to access the CVS repository located at localhost using pserver, ssh would do the rest.

This method is now “integrated” into eclipse. When going to File->New->Project->CVS->Project from CVS, you can now choose the pserverssh2 connection method.

You then have to fill the “Host” field using this syntax:

sshlogin@ssh.example.org#sshPort@cvs.example.org

or

sshlogin@ssh.example.org@cvs.example.org

if the ssh server listens on the default port 22.

You then fill in the username and password with your pserver CVS’ credentials and you’re all set!

Enjoy!

Tags:

Leave a Reply