Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh-add "Error connecting to agent: Connection refused"

Tags:

ssh

My MacBook rebooted and when it does that I have to typically add my private key via ssh-add, using the following command

$ssh-add ~/.ssh/id_rsa

And I never have any issues, Today I am getting this error

ssh-add ~/.ssh/id_rsa
Error connecting to agent: Connection refused

What may be causing this? How do I fix it?

like image 961
Vijay Kumar Avatar asked Jun 26 '19 14:06

Vijay Kumar


2 Answers

Start the ssh-agent by running

$ eval "$(ssh-agent)"

in your terminal window.

like image 94
Oliver Avatar answered Oct 23 '22 15:10

Oliver


I'm using iTerm2 on mac, I just Session -> Restart session

like image 19
Ricky Levi Avatar answered Oct 23 '22 16:10

Ricky Levi