CVS over ssh
Doing CVS over ssh is mostly relevant for those who copy out the whole repository using rsync (see previous page) or who are using CVS for version control of module outside cvs.drupal.org.
Generate a 2048 or 4096 bit rsa2 key pair, using a strong passphrase
(see the first link below).
On a *nix system, you can generally just use this command (from the terminal):
$ ssh-keygen -b 4096 -C myname@mycomputerThe -C indicates a comment. Replace myname@mycomputer with some
indicator of who you are and possibly which machine you are using to
generate the key. You will be prompted for a passphrase and the files
generated in ~/.ssh. Make sure that .ssh directory and all the files
within are NOT group or world readable.
http://www.bgl.mcs.anl.gov/Documentation/Policies/sshpolicy.php
http://www-128.ibm.com/developerworks/linux/library/l-keyc.html
http://pkeck.myweb.uga.edu/ssh/
Transfer via sftp the public key (file ending with *.pub) to your
account. Log in and install it like:
$ cat id_rsa.pub >> .ssh/authorized_keysMake sure that the authorized_keys file and .ssh are NOT group or
world readable or writable. The public key can be freely shared, but
the corresponding private key (e.g. ~/.ssh/id_rsa) must not be
disclosed.
Test your new key. Make sure the ssh agent is running (try: "ssh-add -l")
If not run:
$ ssh-agentOn Mac 10.4, you will have to paste the output back into terminal to
actually set the environment variables.
Now run:
$ ssh-addyou should be prompted for your passphrase from above. Now you should
be able to do (substitute your username)
$ ssh username@example.comand get logged in without needing a password. If so, log out and
proceed. Assuming you are running bash as your shell, do:
$ export CVS_RSH=sshand also add that command to your local machine's ~/.profile
Now, you should be able to check out on your local machine from the
remote CVS (substitute in your username below and appropriate remote CVS path):
$ mkdir mycode; cd mycode
$ cvs -d:ext:username@example.com:/home/cvs/code co modules
$ cvs -d:ext:username@example.com:/home/cvs/code co themes