Preface
you may come across the situation, were you are not quite sure if your ssh-agent is using your gpg-agent or not. Here are two commands to check if evertyhing is correctly set up or not.
Example
- Check environment variables:
echo $SSH_AUTH_SOCK
- If the path contains
gpg-agent, SSH is using the GPG agent.
If the output contains a path which includes gpg-agent, then ssh is using the gpg-agent.
- Check if the gpg-agent daemon is running:
gpg-agent --daemongpg-agent: a gpg-agent is already running - not starting a new one
- List all your your current public keys:
ssh-add -Lssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrybiMq4TgWa9lcbxWQDhLRUov0ctBuCx0F/uDMZv4MOTuRMDGiKGWcPre02jshSKPDNaTwKCISdwwPpfmosacyBkqgDcp1Yv5VWiKmtbOY8GeAxEBB6r7xEFrxNnXWnxUJDdyQ1ZEhb+Ods8ZZu5pUTXcPZahsMUamt/sWFORUEednI1HzFDumGa/9iUt890+fRElQ6PKvqXvGp8XKBm8ZsOunMGG5oSNHpS55WmYQTGBW5fSU3Krd3/OlXtBmLGZ0P5CXN/nXhKLRSEvQ9vAiIeelMd/NLpU5nl6gFPZDNZFklD41H7YfMtRONFbX25yfLs7/N7Aa0LTSDMU18Tf (none)
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILOwBidfdZzcSEIPSRT0C8U9U55WSES1ugqAKE+nvgQ9 (none)