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 -
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.