Accessing CVS via SSH on Windows

http://www.devguy.com/fp/cfgmgmt/cvs/cvs_ssh.htm

TortoiseCVS Configuration

This is by far the easiest strategy because TortoiseCVS supports SSH out of the box!


WinCVS Configuration

  1. Get plink from the Putty Site
  2. Install WinCVS 1.3 or later -- If you also use WinCVS 1.2, install 1.3 in a separate directory
  3. Do not delete or overwrite the CVS.EXE that is installed in the newly installed WinCVS 1.3 program directory.  WinCVS needs this specific version and this version of WinCVS will not work properly without it.
  4. Run WinCVS 1.3 (or later)
  5. Select Admin/Preferences...
  6. Set CVSROOT to
    :ext:username@servername:/cvsroot
  7. Set Authentication to ssh
  8. Click Settings... (for the ssh protocol)
  9. Click "If ssh is not in the PATH" and enter c:\program files\putty\plink.exe
  10. For "additional SSH options" enter:
    -ssh -pw YOURPASSWORD

Note:  Cygwin's ssh.exe is a viable replacement for plink.exe.  The -ssh option is not necessary with ssh.exe.  I have not tried it personally.  Cygwin is harder to install for beginners compared to plink.  Read more about Cygwin and ssh installation here.

Password-Less Configuration with Public Keys

If you want to avoid typing your password into the WinCVS dialog box (which is not very secure)...

  1. Get pageant and puttygen from the Putty Site
  2. Use puttygen to create a public and private key pair
  3. Put your public key on the CVS server
  4. Run pageant to keep track of your private key
  5. Run WinCVS
  6. Select Admin/Preferences...
  7. Click Settings... (for the ssh protocol)
  8. For "additional SSH options" enter:
    -ssh

Hiding Your Password without Public Keys

If you want to avoid typing your password at the command line for each operation and don't have the ability to put your public key on the SSH server...

  1. Create the following one-line Perl script and save it as my_ssh_cvs.pl
    system("plink.exe", "-ssh", "-pw", "YOURPASSWORD", @ARGV);
  2. Use PERL2EXE or ActiveState's perldevkit (perlapp -f my_ssh_cvs.pl) to create an executable from the script, e.g., my_ssh_cvs.exe
  3. Delete my_ssh_cvs.pl
  4. Run WinCVS
  5. Select Admin/Preferences...
  6. Click Settings... (for the ssh protocol)
  7. Click "If ssh is not in the PATH" and enter my_ssh_cvs.exe
  8. For "additional SSH options", leave it blank

Command-Line Configuration

Set the CVSROOT environment variable to
:ext:username@servername:/cvsroot

Cygwin Installation

If you don't want to install Cygwin, you can use plink.  To use plink, skip this section and follow the instructions in the following two paragraphs.

  1. Read about Cygwin and ssh installation here
  2. Set the CVS_RSH environment variable to
    c:\cygwin\bin\ssh.exe
Password-Less Configuration with Public Keys

If you want to avoid typing your password at the command line for each operation...

  1. Get pageant and puttygen from the Putty Site
  2. Use puttygen to create a public and private key pair
  3. Put your public key on the CVS server
  4. run pageant to keep track of your private key
  5. The following two steps can be avoided by getting the executable dgplink.exe, by installing PCTKEXE.tar.gz
  6. Create the following one-line Perl script and save it as my_ssh_cvs.pl
    system("plink.exe", "-ssh", @ARGV);
  7. Use PERL2EXE or ActiveState's perldevkit (perlapp -f my_ssh_cvs.pl) to create an executable from the script, e.g., my_ssh_cvs.exe
  8. Set the environment variable CVS_RSH to the full path of my_ssh_cvs.exe (or dgplink.exe)

Avoiding Password Entry without Public Keys

If you want to avoid typing your password at the command line for each operation and don't have the ability to put your public key on the SSH server...

  1. Create the following one-line Perl script and save it as my_ssh_cvs.pl
    system("plink.exe", "-ssh", "-pw", "YOURPASSWORD", @ARGV);
  2. Use PERL2EXE or ActiveState's perldevkit (perlapp -f my_ssh_cvs.pl) to create an executable from the script, e.g., my_ssh_cvs.exe
  3. Delete my_ssh_cvs.pl
  4. Set the environment variable CVS_RSH to the full path of my_ssh_cvs.exe

Setting up CVSNT Server Access via SSH on Windows

I have not tried this myself.  Theoretically it should be possible to run CVSNT via SSH as long as you install a SSH server on the CVS server.

Cygwin has a free SSH server for Windows.  There is serious a problem with the Cygwin server.

Also, try VanDyke VShell.  It doesn't have the public key authentication bug and it's a heck of a lot easier to install.


posted @ 2004-04-17 17:55  dudu  阅读(2880)  评论(0编辑  收藏  举报