Cygwin

Setting up CVS & SSHd on Windows

CVS

Works "out of the box"...
Set the CVS_RSH and CVSROOT environment variable to map the proper cvsroot directory and connection mode.
For labtec for instance:
CVS_RSH=ssh; CVSROOT=me@labtec:/where/is/cvsroot/

SSHd


http://ncyoung.com/entry/389 and

Using RSA authentication

A couple steps:
  • Generate a private/public key pair:
    ssh-keygen
  • Run the ssh agent that will represent the identity:
    ssh-agent /bin/bash
  • add the current user to the agent:
    ssh-add
  • copy the ~/.ssh/identity.pub to the remote host at .ssh/authorized_keys
  • connect and enter passphrase once for this session
To avoid doing this over and over again, ssh-agent and ssh-add can be started when a login occurs.
For an X session for instance, in the .xsession add at the beginning:
eval 'ssh-agent -s'
ssh-add < /dev/null
If there is no terminal available it is necessary to run a tool such as ssh-askpass that will open a terminal and ask for the passphrase. So make sure that the tool exists and that the environment variable SSH_ASKPASS is set before trying.