9

I have tried every possible piece of command I could lay my hands on. I still get this. I spun a digital ocean droplet with ubuntu 16.04 on it. I followed the tutorial until I had to login in again as the new user. I am at my wits end trying to find a solution. This is the output if I give the command ssh-add

Could not open a connection to your authentication agent.
Abraxas
  • 4,486

3 Answers3

15

I think your ssh-agent isn't working!
Perform the following commands...

eval `ssh-agent -s` 
ssh-add
karel
  • 13,706
1

This may indicate file permission problems to your ~/.gnupg directory and underlying files!

Also make sure you have valid pinentry installed and operational, otherwise cannot validate PIN to your smartcard and this problem will occur as well!

The example ~/.gnupg/gpg-agent.conf should look like this:

enable-ssh-support
pinentry-program /Applications/MacPorts/pinentry-mac.app/Contents/MacOS/pinentry-mac

After changes are made to the configuration remember to gpgconf --reload.

CeDeROM
  • 181
1

For gpg2.1

SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" export SSH_AUTH_SOCK

Jim M
  • 151