Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-29 Thread Simon Josefsson
Lance R. Vick la...@lrvick.net writes: I only ever tried this on 2.0.0 as far as older versions go, and that was similarly broken. I didn't bother documenting as I saw there were some smartcard updates in 2.1.4 so I upgraded. Just now had another variation (on 2.1.4): 1. start gpg-agent

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-18 Thread NIIBE Yutaka
Hello, Thank you for more information. On 06/19/2015 06:57 AM, Lance R. Vick wrote: Another example I just had happen: 1. start gpg-agent 2. populate SSH_AUTH_SOCK 3. ssh successfully 4. remove yubikey 5. insert yubikey 6. attempt to ssh - Permission Denied (Publickey) 7. `gpg --card

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-18 Thread Lance R. Vick
I only ever tried this on 2.0.0 as far as older versions go, and that was similarly broken. I didn't bother documenting as I saw there were some smartcard updates in 2.1.4 so I upgraded. Just now had another variation (on 2.1.4): 1. start gpg-agent 2. populate SSH_AUTH_SOCK 3. ssh successfully

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-18 Thread Lance R. Vick
Another example I just had happen: 1. start gpg-agent 2. populate SSH_AUTH_SOCK 3. ssh successfully 4. remove yubikey 5. insert yubikey 6. attempt to ssh - Permission Denied (Publickey) 7. `gpg --card status` - no card present 8. `gpg --card status` - no card present 9. `gpg --card status` - no

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-18 Thread Werner Koch
On Wed, 17 Jun 2015 18:17, si...@josefsson.org said: I've seen the error many times, also when I used a g10code smartcard, but lately things have been smooth. I think there have been a couple of Old versions of GnuPG assumed that there is a card reader which can tell you whether a card has

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-17 Thread NIIBE Yutaka
On 06/17/2015 06:41 PM, Lance R. Vick wrote: scd apdu 00 f1 00 00 is just a way to return a version number from a Yubikey GPG smartcard. Thank you for clarification. In that case, I think that adding learn works. Like: $ gpg-connect-agent --hex learn scd apdu 00 f1 00 00 /bye The learn

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-17 Thread Lance R. Vick
scd apdu 00 f1 00 00 is just a way to return a version number from a Yubikey GPG smartcard. Any other GPG commands fail as well, such as sign/encrypt/auth, until 'gpg --card-status' is run to wake the card back up. I would expect that when I perform a gpg command, it should query gpg-agent,

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-17 Thread Kristian Fiskerstrand
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 06/17/2015 06:17 PM, Simon Josefsson wrote: NIIBE Yutaka gni...@fsij.org writes: Gpg frontend certainly works well for --sign, --decrypt after you remove your token and insert it again. Please try: (1) Insert token (2) Run gpg

Re: gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-17 Thread Simon Josefsson
NIIBE Yutaka gni...@fsij.org writes: Gpg frontend certainly works well for --sign, --decrypt after you remove your token and insert it again. Please try: (1) Insert token (2) Run gpg --card-status (3) Remove token (4) Run gpg --sign or gpg --decrypt SSH authentication also works well

gpg-agent unable to see yubikey until manually re-running `gpg --card-status`

2015-06-16 Thread Lance R. Vick
Very confused by this. Every time I insert my yubikey into a system I must do 'gpg --card-status' to make gpg-agent aware it exists again. Using: gpg/gpg-agent 2.1.4 Expected Results: 1. Insert yubikey 2. Issue version command to gpg agent 3. Version is reported 4. Remove and re-insert key 5.