Running CVS from a remote machine using SSH
At my job we have our CVS repository in a NFS mounted share. So when you are at work you following environment variables set ie.
setenv CVSROOT /cvs
Unfortunately on occasion if you want to do work from home you may want
to checkout a CVS repository to your local home machine and work on it
locally. You could check out the CVS repository onto your machine at
work then scp it to your home machine but that is overly complicated.
Easier solution is simply do following on your local machine
setenv CVS_RSH ssh
setenv CVSROOT :ext:vuksan@host.mydomain.com:/cvs
Then normal cvs commands:
cvs checkout project/Makefile
cvs edit project/Makefile
cvs commit project/Makefile
The local cvs command starts a session with a
remote cvs command with one argument, "server". Basically it runs:
ssh -l vuksan host.mydomain.com cvs server
and then communicates thru
stdin/stdout. Please note that each time you try to execute a command
it will ask you for a username and password since everything is going
through SSH. You can avoid being prompted for a password if you create
SSH public/private key pairs. Do a man on ssh and look for
authorized_keys2.
Thanks to Hans Mack for finding out this gem :-)