I'm working on adding ssh authentication to a fresh Linode Ubuntu 12.04LTS deployment. I followed their guide to the letter up to the point where I need to ssh into the box with my now freshly added ssh key, but I instead get:
"Error: agent admitted failure to sign using the key"
Which is fine, the Ubuntu OpenSSH guide says that all you need to do is to run
ssh-add
on the server and you'll be golden. Except when I do that I get
Could not open a connection to your authentication agent.
I double-checked the processes and indeed it does look like ssh-agent is already running (in fact twice, because I tried the eval trick, which didn't work at all):
alex@mybox:~$ ps aux | grep ssh
root 2645 0.0 0.1 49948 776 ? Ss Mar13 0:00 /usr/sbin/sshd -D
alex 16989 0.0 0.0 12492 324 ? Ss Mar13 0:00 ssh-agent
root 18986 0.0 0.7 73360 3564 ? Ss 09:03 0:00 sshd: alex [priv]
alex 19119 0.0 0.3 73360 1676 ? S 09:03 0:00 sshd: alex@pts/0
alex 19785 0.0 0.0 12492 316 ? Ss 09:59 0:00 ssh-agent
root 20026 0.0 0.7 73360 3568 ? Ss 10:02 0:00 sshd: alex [priv]
alex 20184 0.0 0.3 73360 1680 ? S 10:03 0:00 sshd: alex@pts/1
alex 20325 0.0 0.1 9384 924 pts/1 S+ 10:13 0:00 grep --color=auto ssh
As I mentioned, the eval approach managed to make ssh-add work once, but when I tried to log in again, the system reported the same error I listed above. I also now have two instances of ssh-agent.
What is the proper way of addressing this?