I've got to install a public key on my server so that a remote script can ftp files to my server.
I placed the public key in my ~/.ssh directory and made sure that ssh-agent is running and that the relevant env variables are set correctly.
I made sure that the permissions on the public key are set to 600.
I ran ssh-add and it didn't add the public key. I ran ssh-add and supplied the name of the public key and it asked for the pass phrase. Since the user who generated the public key did so without a pass phrase I left it blank and hit enter. Nothing happened and echo $? returns 1.
I renamed the public key to identity. I ran ssh-add again and it tried to add the key, again asking for a pass phrase. Again I hit enter and nothing happened, echo $? still returns 1.
I've found several answers that say ssh-add will add private keys if you supply arguments and that you have to run it without arguments. This doesn't seem to be the reality. I've tried the key in both the ssh2 format and the openSSH format.
I also read that I can add the key manually. I've read that the file is supposed to be in ~/.ssh and I've read different sources say that it had to be authorized_keys, authorized_keys2 and known_hosts. I tried all three and the remote script still cannot log in.
The format I used for the entry in authorized_keys was "ssh-rsa AAAAB3...="
Permissions for all three files are 600.
I'm completely lost.
I'm on Solaris 10.
My problem was that I had an = at the end of the line in my authorized_keys file.
I had added the = because it was how the authorized_keys file on another server I used was written. I don't know why it was like that or why I assumed it was a necessary part or the format but removing that let the remote user login without any problem.