SSH Public Key Format
ssh-keygen -i to convert SSH2-compatible format to OpenSSH compatible format.
-i This option will read an unencrypted private (or public) key file in SSH2-compatible format and print an OpenSSH compatible private (or public) key to stdout. ssh-keygen also reads the RFC 4716 SSH Public Key File Format. This option allows importing keys from several commercial SSH implementations.
This is the complete, correct answer:
ssh-keygen -i -m PKCS8 -f public-key.pem
You do have to convert the public key to openssh convention:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBmhLUTJiP[and so on]== somename-20060227
Also make sure that the key occupies exactly one line and no line breaks were introduced while copying.
Just rewrite your key in format suited for
keytype keybody keyname
Keep in mind that trailing "==" are necessary placeholders to keep keylength equal to desired length.