SSH: Agent Admitted Failure To Sign Using The Key Error And Solution

by on September 17, 2011 · 29 comments· LAST UPDATED October 20, 2013

in , ,

I've recently regenrated and uploaded a new public ssh-key using the ssh-copy-id command. Now I'm getting the following error:

ssh root@server3
Agent admitted failure to sign using the key.
root@server3's password:

How do I fix this problem?

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
Requirementsssh-add/Linux
Estimated completion time1m
To fix this problem you need logout of your Unix / Linux / OS X / BSD desktop session and log back in again to force the agent to forget identity. Another recommend option is to run the ssh-add command to add RSA or DSA identities to the authentication agent. This will fix your problem without login out from the current session. The syntax is as follows:

$ ssh-add

Pro tip: If your key located in different path or does not have the default filename, you will need to pass the path to ssh-add command as follows:

$ ssh-add /path/to/my/ssh_key
$ ssh-add ~/.ssh/server3_key

See ssh-add(1) command man page for more information.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 29 comments… read them below or add one }

1 Luis Hernandez January 24, 2012 at 8:14 pm

Great tip !!!

Reply

2 Marcia Cupery June 13, 2012 at 3:19 am

Came across this answer after trying a million things. I can’t believe it was that simple. Thank you!!!

Reply

3 Manojkuamr July 9, 2012 at 1:46 pm

Thanks

Reply

4 Luiyo July 23, 2012 at 6:18 pm

ssh-add worked for me!!

Thanks!

Reply

5 Julian Bruno August 2, 2012 at 1:51 am

ssh-add worked for me!!

thks

Reply

6 Jose August 15, 2012 at 11:24 pm

This was a great reference starting page,
kl thanks

Reply

7 manas ranjan palai August 29, 2012 at 11:38 am

**Agent admitted failure to sign using the key.**

ssh-add is ultimate solution for above problem.

Reply

8 James Ritchie September 4, 2012 at 11:29 am

Yup: this approach worked for me. Got this error during trial 11.2.0.3 Grid Infrastructure installation over pair of Oracle Linux 6.2 VMs in virtualbox on laptop. Cheers Vivek. No reference to this in E22489-06. Maybe Oracle should pay *you* a license…

Reply

9 manas ranjan palai September 5, 2012 at 8:39 am

Actually i tryed ssh-add command in ubuntu 10.04 when i want to logged in to remote linux system without password ,there is an error message came ”Agent admitted failure to sign using the key” and it asked for password then i try ssh-add command and it works fine.

Above error came after creating keys.

Reply

10 sirvon September 8, 2012 at 11:35 pm

thx
was discouraged in the past about password-less ssh
but this post
has me dancing!

Reply

11 Ozan November 8, 2012 at 9:42 am

thank you, you saved the day one more time

Reply

12 nagu January 25, 2013 at 5:39 am

you done a great job., Thanks for the great tip.

Reply

13 Amal Murali February 17, 2013 at 1:07 pm

Great. This fixed it, thanks!

Reply

14 Pratheep March 20, 2013 at 7:33 am

Thanks a lot…ssh-add worked for me!
-Pratheep

Reply

15 kiritisai May 18, 2013 at 12:55 pm

thank you very much, that was really helpful for cloning my repository.

Reply

16 Tim July 9, 2013 at 10:17 am

Thank you for this. I’ve been smashing my forehead against the keyboard all day. ssh-add did the trick for me!

Reply

17 Japan Shah October 8, 2013 at 6:07 pm

Simply Amazing.
It works, you have saved me.

Thanks,
Japan

Reply

18 balamurugan October 20, 2013 at 1:39 pm

super, i spend whole day to fix issue finally you helped me lot…

Keep it up very very thanks……

Reply

19 Vitor November 21, 2013 at 3:07 pm

Great post!

Reply

20 Jayaram Sudheer January 23, 2014 at 6:55 am

Thanks,it helped me a lot…

Reply

21 Anurag Jajoo February 11, 2014 at 11:29 am

Hey,
Thanks a lot!
ssh-add solved my problem

Reply

22 muthu February 11, 2014 at 11:45 am

Thanks
Its working…

Reply

23 M Tandon March 2, 2014 at 3:00 am

Hi Guys, I am working on Linux 6.5 under VM Machine and on my Oracle Install, I got suck with it, with ssh connectivity, and I tried it on terminal with the ssh-add command and it worked as charm, but later on Install it again failed and I tried on terminal it again started asking me to put the password, Any idea what else is stopping the Agent again and getting the under mentioned Message and who to move on it.
“” Agent admitted failure to sign using the key””

Reply

24 M Tandon March 2, 2014 at 10:46 pm

Finally did the by-pass of Agent with command as “” SSH_AUTH_SOCK=0 “”

Reply

25 Eva April 19, 2014 at 11:14 am

Thanks, worked for me!

Reply

26 Peter May 8, 2014 at 9:30 pm

Thanks for the solution. But here’s a better one, better than restarting the desktop:

forget about keys:

ssh-add -D

and then optionally add your key again:

ssh-add

Reply

27 Arup Sarker September 25, 2014 at 12:06 pm

You haved saved my day, man :)

Reply

28 Ankush November 11, 2014 at 12:44 am

Great tip.It worked for me.

This post is really very helpful.
Thanks a lot.

Cheers

Reply

29 Jim November 20, 2014 at 4:01 pm

This does not work for me. After doing ‘ssh-add’, I now get the “Agent admitted failure to sign using the key.” message twice. I didn’t use to get this message at all, but now lately it has started happening. What am I doing wrong?

Reply

Leave a Comment

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: