SSH Fix for Agent admitted failure to sign using the key


After generating keys and setting up authorized_keys correctly, you may encounter this error when trying to shell into the remote machines:

Agent admitted failure to sign using the key

You’re forced to supply the password, and then it works. So what’s the problem? Identity. You need to run ssh-add. So from scratch, i’ll reproduce the problem and solution.

Generate keys on both hosts.

Then you do the same thing on the other machine. Now cat the remote public key and append it to your authorized_keys file.

Your authorized_keys file should have the public key from both hosts inside. Copy authorized_keys to the remote host again to overwrite his version with yours.

At this point everything should work, but doesn’t.

Run ssh-add and voila, problem solved.

Now you should be able to log in or run individual commands on the remote host without getting prompted for a password.


Posted on June 5th, by admica in Linux, security.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">