cashmere

cashmere

How to check if your gpg-agent is running for SSH

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

  1. Check environment variables:
echo $SSH_AUTH_SOCK

If the output contains a path which includes gpg-agent, then ssh is using the gpg-agent.

  1. Check if the gpg-agent daemon is running:
gpg-agent --daemon
gpg-agent: a gpg-agent is already running - not starting a new one
  1. List all your your current public keys:
ssh-add -L

References

Tags: #gpg #howto #linux #ssh