I am using host X. I have ssh access to host Y. Host Y has ssh access
to host Z. I want to check out a CVS directory from Z onto X. Here's how:
- On Y, create a custom ssh certificate (with ssh-keygen) that
doesn't have a passphrase. Be careful not to overwrite your normal
certificate; e.g., save it to Y:~/.ssh/id_dsa_z.
- Copy the contents of the public part of the cert (the .pub file)
to Z:~/.ssh/authorized_keys2.
- Create the file X:~/z-ssh:
#!/bin/sh
exec ssh y ssh -i ~/.ssh/id_dsa_z $*
- Make sure that ~/ is in your path.
- Set the environment variable CVS_RSH=z-ssh on X.
With all that in place, you can now do a normal ssh checkout:
cvs -d :ext:z:/var/lib/cvs co foobar
Thanks to Guan Yang for the hard parts.