At Thu, 24 Sep 2009 15:16:31 +0100, Richard Lewis wrote:
Hi ALUG,
I'm trying to get ssh-agent to work properly so that I can have passwordless ssh.
I've got my public key in the authorized_keys files on the relevant remote machines, and I can log in to them by just unlocking my key OK.
The bit that I'm stuck with is starting ssh-agent properly. If I run urxvt, for example, under ssh-agent:
$ ssh-agent urxvt
I can't then run ssh-add, it says "Could not open a connection to your authentication agent." Although ps reports that the ssh-agent is running.
So I've just fixed this part of the problem. (Apologies for the premature question.)
I had a package called keychain installed which is supposed to make ssh-agent survive between logins (I didn't really want this feature, just random fiddling from the last time I tried to get this to work). Anyway, it was setting some stored, and, importantly, wrong values for the SSH_AGENT_PID and SSH_AUTH_SOCK variables. I think then ssh-add couldn't connect to the ssh-agent because it was looking in the wrong socket.
I removed keychain and its settings and now I can $ ssh-agent urxvt and ssh-add works fine.