Converting an SSH2 public key to PEM format - Amazon Transfer Family
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Converting an SSH2 public key to PEM format

Amazon Transfer Family only accepts PEM formatted public keys. If you have an SSH2 public key, you need to convert it. An SSH2 public key has the following format:

---- BEGIN SSH2 PUBLIC KEY ---- Comment: "rsa-key-20160402" AAAAB3NzaC1yc2EAAAABJQAAAgEAiL0jjDdFqK/kYThqKt7THrjABTPWvXmB3URI : : ---- END SSH2 PUBLIC KEY ----

A PEM public key has the following format:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAA...

Run the following command to convert an SSH2-formatted public key into a PEM-formatted public key. Replace ssh2-key with the name of your SSH2 key, and PEM-key with the name of your PEM key.

ssh-keygen -i -f ssh2-key.pub > PEM-key.pub