Whenever I am trying to connect to localhost using ssh I get the following error -

solr@ubuntu:~$ ssh localhost
Agent admitted failure to sign using the key.
solr@ubuntu's password: 

And after entering the password I am able to make the connection. I have copied the public key in the authorized_keys file already and I am trying to make a passwordless connection.

Same thing is happening if I am issuing "ssh solr@ubuntu".

link|improve this question
feedback

migrated from stackoverflow.com Dec 1 '11 at 10:30

This question came from our site for professional and enthusiast programmers.

3 Answers

You have to create the key without a password: http://linuxproblem.org/art_9.html

link|improve this answer
feedback

In your user Home Dir: ensure .ssh/ exists and has perms 0600 (user read/write only). Create a file called authorized_keys also with 0600 perms and in it place the public keys of the systems you wish to connect with. These public keys can be found on the host system under .ssh/id_dsa.pub or id_rsa.pub

Change /etc/ssh/sshd_config AuthorizedKeysFile .ssh/authorized_keys PubkeyAuthentication yes PasswordAuthentication no UsePAM no

This all allows public key authentication which uses the public key on a host system for authentication in lieu of traditional password authentication. This method is preferred but if you use it, I strongly encourage you to disable password authentication once it has been setup.

link|improve this answer
feedback

I used ssh-keygen -t rsa -P and then I restarted my system and now it is working fine.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown