X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: =?ISO-8859-1?Q?Ren=E9_Berber?= Subject: Re: keychain doesn't properly cache ssh key Date: Fri, 11 Aug 2006 01:15:57 -0500 Lines: 71 Message-ID: References: <080109DC-4C78-4C2F-82CD-E5B3FDC9AABE AT uwalumni DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) In-Reply-To: <080109DC-4C78-4C2F-82CD-E5B3FDC9AABE@uwalumni.com> OpenPGP: url=hkp://random.sks.keyserver.penguin.de X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dominik Hoffmann wrote: > I have a very stock installation of Cygwin (Cygwin.dll Version 1.5.21-2) > on Windows XP Pro. I installed the ssh and rsync packages, as well as > keychain, all from Cygwin's installer interface. The version of > keychain, as you probably know, that Cygwin currently installs is > 2.5.3.1. keychain is said to work in the Cygwin environment, and yet I > get this type of behavior: >=20 >> Administrator AT NICHD-PALM-Xfer ~ >> $ keychain id_dsa >> >> KeyChain 2.5.3.1; http://www.gentoo.org/proj/en/keychain/ >> Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL >> >> * Found existing ssh-agent (504) >> * Known ssh key: /home/Administrator/.ssh/id_dsa >> >> >> Administrator AT NICHD-PALM-Xfer ~ >> $ ssh palmxfer AT ssh0 DOT janelia DOT org >> Enter passphrase for key '/home/Administrator/.ssh/id_dsa': >> Last login: Thu Aug 10 17:53:06 2006 from nichd32t33.nichd.nih.gov >> [palmxfer AT b04u02 ~]$ >=20 > In other words, it recognizes the existing cached key but doesn't use > it. To be precise: keychain recognizes the existing cached key but ssh doesn't = use the cache. > Maybe this issue with ssh-add gets at the root of the problem: >=20 >> Administrator AT NICHD-PALM-Xfer ~ >> $ ssh-add ~/.ssh/id_dsa >> Could not open a connection to your authentication agent. Yep, that means that keychain (which started ssh-agent) did not set the environment variables SSH_AGENT_PID and SSH_AUTH_SOCK, without the second n= one of the other command will connect to ssh-agent (try "ssh-add -l" an you'll = get the same output). You can test by setting the variables yourself, do a "ls /tmp/ssh*" to see = where the socket is, then set the variables, for instance: $ ls -d /tmp/ssh* /tmp/ssh-43tNvsvRBs/ $ ls /tmp/ssh* agent.3580=3D $ export SSH_AGENT_PID=3D3580 $ export SSH_AUTH_SOCK=3D/tmp/ssh-43tNvsvRBs/agent.3580 > Note the error message. >=20 > Is anyone aware of anything that would help me to get keychain work > adequately? Even with that some commands will not work as expected because they seem to= use gpg-agent, for instance: "gpg --sign -b --use-agent Wiz.tar.gz". Keychain seems to be missing the equivalent of "eval `ssh-agent -s`" (if us= ing bash). --=20 Ren=E9 Berber -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/