-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH private key check prevents use of Yubikey via gpg-agent #209
Comments
I would also love to see support for loading private keys from an agent. I also think support for uploading a public key should be optional, provided |
@seth-reeser You tagged this issue with "more information needed." What additional information do you need? |
Found this thread while searching for a solution to the same problem, thought I'd leave my workaround here in case someone else still needs it: |
@seth-reeser If this helps the "more information needed" request, (and this isn't limited to yubikeys), once a private key has been entered into a ssh agent, one usually erases the private key file from the filesystem to keep it protected within the agent system. When ssh needs to know which identity to use, we point it to a file that contains the output of "ssh-add -L" for that key -- this output is the public ssh key for the private key(s) it contains. Using the SSH_AUTH_SOCK environment variable, ssh then talks with the agent to ask it if it has the private key for that public key and upon success, passes off the 'sign_and_send_pubkey' step to the agent. (The agent then passes that off to the yubikey if that's part of the picture here) Ideally, it would be "nice to have" vagrant rely on ssh to use its default ~/.ssh/config file to provide the appropriate identity and just attempt to ssh as "vagrant" without explicitly needing to provide any identity information at all. This is all we'd need in the config file to make vagrant work everywhere:
|
The validation of SSH keys currently prevents the use of an RSA key stored on a Yubikey for authentication. Yubikeys support the use of on-card OpenPGP, which can then be loaded into the ssh-agent emulation of gpg-agent. The triple-net of all this is that you can generate an SSH public key, but the private key never leaves the device.
When you specify
override.ssh.private_key_path
, vagrant-digitalocean expects to find a private key, but only the public key is on disk. The private key is available to the agent, but isn't on-disk. As a result, you get messages like:and there's no way (as far as I can tell) to point the plugin just to the public key (e.g.
~/.ssh/id_rsa.pub
) for upload, as that results in:It would be nice if there was a way to specify the public key to upload, and to rely on ssh-agent for loading the private keys.
The text was updated successfully, but these errors were encountered: