SSH Client for Windows
Home Download Purchase Support Manual Screenshots Media About

5.1 How To Use Private Shell with CVS

Before you can use Private Shell to tunnel CVS connection, you have to be able to connect to the server via SSH. Read the Password Authentication and the Public Key Authentication (optional) topics first.

Set the environment variable:

cvs_rsh=ssh.exe

Note: You have to append C:\Program Files\Private Shell\ (or another path if you have installed Private Shell elsewhere) to the PATH environment variable.

To specify a particular profile to use with CVS connections, set

PRIVATESHELL_CLI_PROFILE = "profile name"

Important Note:
The Default profile cannot be used for CVS connections.

How to add environment variables

  • Windows 2000 / XP
    open Start --> Settings --> Control Panel --> System
    choose Advanced --> Environment Variables
  • Windows NT
    Start->Settings->Control Panel->System->Environment
  • Windows 95 / 98
    edit c:\autoexec.bat file.

Important Note:
You have to test the connection before you are going to use it with CVS. To test the connection, type in the command line:

ssh.exe login@server ls

where login@server is your login and the server you are connecting to, e.g.:

ssh.exe john@privateshell.com ls

Note:
If you are connecting to the server for the first time, you will be asked to check the server fingerprint. You must answer "yes" to continue connection.

How can I connect to more than one CVS server through Private Shell?

This can be a problem at the first sight since both Private Shell and CVS use some environment variables to specify several connection parameters. But there is very simple workaround - in your working directory where you will run cvs, create a batch file with the following content and name it cvs.bat:

@echo off
set CVSROOT=path_to_your_cvs_repository
set PRIVATESHELL_CLI_PROFILE=Private_Shell_profile_name_used_to_connect_to_the_server
cvs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

Now you can run cvs from this catalog as usual:

cvs command parameter1 parameter2 ...

The trick is that the operating system firstly searches the current directory for a "cvs" file. And it finds cvs.bat. But from the batch file itself we force the system to launch original cvs.exe because we mention its extension explicitly.

Note:
You can pass no more than 9 parameters to CVS with this method.

If you have any problems with CVS try to refer to the F.A.Q. and troubleshooting topic.


Comment On This Topic: