Import Key Pair

Importing existing Key Pair to use with another instance in different region / zone.

It just happened to me, I needed to create instance in Ireland and I want to use my existing key to log into my server. First go to Key Pairs in EC2 management console.

On your local computer, locate a .pem file you want to import.

In terminal, extract public key for use with SSH using following command:

$ ssh-keygen -y -f ec2.pem >

Where ec2.pem is a file path to your existing Key Pair and will be the Public Key file, that you import a Key Pair from.