id_rsa.pub file SSH Error: invalid format

前端 未结 5 476
野的像风
野的像风 2021-02-05 03:31

My co worker and I have been trying to get my macbook to ssh into our AWS production server with no luck, this did work several months ago, but when we went to do it yesterday -

5条回答
  •  死守一世寂寞
    2021-02-05 03:52

    Here's what worked for me.

    Trying to connect to AWS server, I was getting this error: Load key "yourKey.pem": invalid format and there was nothing wrong with the key file content.

    But generating fingerprint would produce : unable to load key <...> :Expecting: ANY PRIVATE KEY...

    What worked for me was to use terminal with nano and manually create a brand new file with the same name

    $ sudo nano yourKey.pem

    paste the text content from the original key file and save it.

    Then the new key's fingerprint matched and ssh access was restored.

    Hope this help.

提交回复
热议问题