3

I'm pulling my hair out on an ssh-agent issue..

I run a VPS under Ubuntu 16.04 and I setup a private/public key to be able to pull code from my Bitbucket repo. I initialized the repo, it all seemed to work fine, and a couple of days later, when I try to pull again, it tells me that the key is not valid.

ssh-add -l says "Could not open a connection to your authentication agent." - so I figure I just have to restart the ssh-agent.. but I always end up getting the same "Could not open a connection to your authentication agent." message.

me@ip:~/.ssh$ eval `ssh-agent -s`
Agent pid 3820
me@ip:~/.ssh$ ssh-add -l
Could not open a connection to your authentication agent.

I've tried rebooting the machine and attempting again but that's no good.. I've run out of ideas from all the posts I've read so.. any suggestions?

  • I also couldn't managed to get ssh-agent work as it is expected. You could try to use ~/.ssh/config file instead that, here in section 2. is presented a short example: askubuntu.com/a/986245/566421 – pa4080 Apr 3 '18 at 9:13
  • I actually already have a config for Bitbucket, but that my "get pull" doesn't seem to care much about that unfortunately.. – Buno Apr 3 '18 at 10:28
  • I'm connecting to github.com by this definition Host github.com IdentityFile ~/.ssh/git/id_rsa... – pa4080 Apr 3 '18 at 11:17
  • I have something very similar for Bitbucket - and it did actually work when I initialized the repo - but I have no idea why this isn't taken into account now when I try to pull.. – Buno Apr 3 '18 at 11:26
1

I set up ssh keys today for github.

This invokation was successful: eval "$(ssh-agent -s)"

Work through these short articles, they are very clear and concise

  • Ok, this line did work.. however it seems that the problem is not with the command use but with the ssh software :( working with not issue on PuTTY, but still getting the "Could not open a connection to your authentication agent." on SmarTTY.. Well.. back to PuTTY I guess! – Buno Apr 8 '18 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.