I have my ssh keys within a yubikey, I use gpg-agent.conf
with something like this:
pinentry-program /usr/local/bin/pinentry-mac
enable-ssh-support
default-cache-ttl 60
max-cache-ttl 120
This helps me to ssh
into any host without having the private key in a file like ~/.ssh/id_rsa
.
But in some cases, like when using tools like ssh-vault, ansible-vault, etc, they need to read the key on file ~/.ssh/id_rsa
therefore wondering if there is a way to call the gpg-agent
to retrieve the key when trying to read from the ~/.ss/id_rsa
, or other ways to retrieve the private keys.
agent-support
, but if I am right there is no way to extract the private key from the agent