I tried to use putty also. I select this pem key there and got this:
Unable to use key file "key.pem" (not a private key).
I read that it is possible to convert a pem to a pub key. I did it like there:
But I got the same error when trying to connect.