How do I use my Yubikey with desktop applications like Sequel Pro or MySQL Workbench?
When you use the GPG Agent (with or without smartcard, the agent takes care of that, so it's not a problem if you don't have one I think) it should ask for the passphrase of your GPG key (or the PIN of the smartcard in my case) and not the SSH password.
But how it works now is that the SSH attempt asks for the SSH password, not the GPG passphrase.
Ok, here is an example:
Using SSH in the terminal, with the
gpg-agent
: (I have a smartcard so it asks for my PIN)It asks for the PIN via the
gpg-agent
.When I use Sequel, before, the behavior was exactly the same, I had the PIN entry window then it was connecting well.
Now I have that:
So, it is not asking for the PIN anymore: or even if I had enter it before, it should use the gpg-agent and finish to login. Instead it asks for the SSH user's password.
Let me know if you need more explanation.
Thanks
Solution by @jacquesbh in sequelpro/issue#2619
Create an Automator Application:
source ~/.bash_profile
open -a Sequel\ Pro
My ~/.bash_profile
contains this:
## SSH with GPG key on Yubikey
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh"
gpgconf --launch gpg-agent
sequelpro/sequelpro#2619