Search code examples
windowssshcygwincvsrsh

Cvs ext method "Connection refused"


I'm using Windows 7 and cygwin. I want to connect to our CVS repository with the following command:

cvs -d :ext:my_username@my_ip:/my_repo_path/ checkout my-parent

Unfortunately I'm getting this error:

my_ip:514: Connection refused

How can I provide a password so that I'm able to connect to the server?


Solution

  • my_ip:514: Connection refused
    

    The cvs "ext" method connects using rsh (remote shell) by default. Port 514 is the standard rsh port. The error "Connection refused" normally means that the remote host isn't accepting connections on the requested port.

    In other words, you tried to connect to the remote host using rsh, not ssh. But the remote server doesn't accept rsh sessions. This isn't very surprising, because rsh is a very insecure protocol and it's not widely used any more.

    To make CVS use ssh instead of rsh, you need to set the CVS_RSH environment variable:

    $ CVS_RSH=ssh; export CVS_RSH
    

    On unix or linux, you'd normally add this line to your .bashrc, .profile, or one of your other shell startup files so that it's set automatically when you log in. On Windows, this http://superuser.com answer describes how to set environment variables. If you're on Windows, you may also need to install an ssh program, because Windows doesn't come with one.

    Once cvs is set to use ssh, ssh will prompt you to type a password if it needs one.

    The book Open Source Development with CVS has a section about the different cvs repository access methods, including how to set the "ext" method to use ssh.