Automatically logging into cvs ext. server...

Gerald Combs gerald at ethereal.com
Mon Mar 17 17:05:25 CST 2003


On Mon, 17 Mar 2003, Matt Graham wrote:

> I'm using a external server for cvs and logging in via ssh.  I'm
> wondering if there is a way to login automatically.
>  
> What I want to do is make a little cron or something that runs something
> like "cvs log filename.py > somefile.txt"  or something. So, I can have
> that .txt file be included by my website.  Then, I could get the updated
> log on my website every so often.  
>  
> Any know how I could do this?  I think the logging in the only thing
> holding me back.  Also..using a pserver is not an option.(dang.)

Set up ssh to use passwordless logins:

  - On the client side, use ssh-keygen to generate a key pair.  You must
    use an empty passphrase for passwordless logins:

      ssh-keygen -t dsa

    This will create two files in your ".ssh" directory: "id_dsa" and
    "id_dsa.pub".  "id_dsa" is your private key.  Keep it safe.

  - Copy "id_dsa.pub" (your public key) to the server.  Append it to
    ~/.ssh/authorized_keys (you will need to create this directory and
    file if they don't exist).

  - On the client side, try ssh'ing to the server.  You _should_ be
    logged in automatically.  If it doesn't work, run 'ssh -v' to see
    where things went wrong.

This assumes you're running reasonably recent versions of openssh on
both ends.  Other versions may need to be set up differently.

BTW, this isn't restricted to CVS.  You can make ssh and anything that
uses it as a transport (e.g. rsync) connect using a key pair instead of
a password.




More information about the Kclug mailing list