SSH authentication headache, solved

So yeah, fast forward since last post and the company that I took a job with was bought by Google… more about that in another post. For now, I wanted to share the solution to a problem I was having that I couldn’t find the answer to anywhere.

When I was setting up my new machine I was getting constant problems trying to ssh to our production servers. I had my ssh keys in the right directory, with the right permissions, but every time I tried to ssh to one of the machines It would prompt me for my password. When I turned on verbose logging I found this error:

PEM_read_PrivateKey failed

After regenerating keys and adding those to the server, countless reboots, we finally found out that my keys where not listed among those that the ssh-agent knew about (and the gui never popped up to prompt me to add them.) So the solution ended up being to use ssh-add to get the key into the list of known keys:

ssh-add .ssh/id_rsa

And viola, that solved it.

One comment

  1. Chris

    frank, darling, i love you. but this is so random.

    oh, and it’s voilà, not viola. a viola is a stringed musical instrument.


Leave a Reply

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