Yubico Forum
https://forum.yubico.com/

[QUESTION] YubiKey 4 on MacOS wrong key in gpg-agent
https://forum.yubico.com/viewtopic.php?f=23&t=2485
Page 1 of 1

Author:  paulina [ Sun Nov 20, 2016 5:50 pm ]
Post subject:  [QUESTION] YubiKey 4 on MacOS wrong key in gpg-agent

Hello everyone,

I have a new YubiKey 4 and I'm on macOS Sierra. I installed gpgtools (https://gpgtools.org/) to configure gpg keys on my yubikey - seems to work great.
I wanted to configure my SSH to authenticate with my keys on the yubikey - this basically works out of the box now with gpg tools, the only thing I had to set up was ~/.gnupg/gpg-agent.conf:
Code:
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
enable-ssh-support
write-env-file
use-standard-socket


and my .bash_profile
Code:
source "$HOME/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID


Now ssh-add -L shows a key exposed from my yubi, and if I understand correctly this should be my authentication key?
If I run gpgkey2ssh with the id of the last key shown by gpg --card-status (should be auth key), it generates a different output than what's shown by ssh-add.
If I run gpgkey2ssh with the ID of my encryption key (second key shown by gpg --card-status) - it matches the key exposed to ssh-add.

So, basically I login via SSH with my encryption key instead of my authentication key. What did I do wrong?

I wanted to check out the walkthrough linked here: https://developers.yubico.com/PGP/SSH_authentication/ but antivirus software freaks out when I try to open the link for OS X.

Author:  ChrisHalos [ Sun Nov 20, 2016 6:21 pm ]
Post subject:  Re: [QUESTION] YubiKey 4 on MacOS wrong key in gpg-agent

The link you're referring to on the SSH page is just a third party website:

http://florin.myip.org/blog/easy-multif ... neo-tokens

(if you don't like links, try searching "Easy multifactor authentication for SSH using YubiKey NEO tokens")

Author:  paulina [ Sun Nov 20, 2016 7:51 pm ]
Post subject:  Re: [QUESTION] YubiKey 4 on MacOS wrong key in gpg-agent

Hi,

Thanks for the response. I don't mind links, it's just this specific page seems to be reported as containing malware.

I'm simply trying to use my gpg keys from my yubi as rsa keys for ssh. And it works, except for some reason gpg-agent uses my encryption key and not my authentication key from my yubi for this. Is there any obvious reason why this would happen?

Thanks.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/