Closed tremby closed 11 years ago
Hi there. I merged #3's pull-request in. Can you see if this fixes things for you?
I had a new server to log in to today. I tried ssh-add -L
before doing anything else and got The agent has no identities.
.
I ran ssh-copyid with the hostname, accepted the host's key and got exit code 1. I then tried to log in and it asked for my password. I entered it and logged in. Printing out authorized_keys shows a garbled line like in #6.
Given that the line The agent has no identities
is not in the authorized_keys file, this issue is fixed but obviously the other still exists.
Similar to #3, I believe.
I had a similar issue -- the script exited with code 1 with no error, and on inspecting authorized_keys on the remote the string
The agent has no identities.
had been added. This was the output ofssh-add -L
, even though I did have an id_rsa file. The solution for me was to runssh-add
alone, which gave some encouraging output, and after thatssh-add -L
gives the expected output and so runningssh-copy-id
again worked.I'm surprised by that because I've never had to run that before.
Perhaps
ssh-add
could be run automatically ifssh-add -L
returns an error code (I didn't check if it did, but presumably it does in this case), or at least notify the user that they may want to run it. And obviously don't add something to the remote's authorized_keys if it's not actually a key!