Create a custom key using the Lightsail
console
You can create custom key pairs from the SSH keys management page in
the Lightsail console, or when creating a new instance.
- SSH keys management page
-
Complete the following procedure to create a custom key pair from the SSH keys
management page in the Lightsail console.
-
Sign in to the Lightsail
console.
-
On the on the top navigation pane, choose the user profile icon.
-
Then, choose Account in the dropdown menu.
-
Choose Create key pair under the Custom
keys section of the page.
-
In the Select a region prompt that appears, choose the
AWS Region in which you want to create your new custom key. You will be able to
configure your new custom key on new instances in the same AWS Region.
-
In the Create a new SSH key pair prompt that appears, give
your custom key a name, and choose Generate key pair.
-
In the Key pair created! prompt that appears, choose
Download private key to save the private key to your local
computer.
-
Choose Ok, got it! to close the prompt.
-
Your new custom key is listed under the Custom keys section
of the page.
- Create instance workflow
-
Complete the following procedure to create a custom key pair as you are creating a
new Lightsail instance.
-
Sign in to the Lightsail
console.
-
Choose Create instance.
-
On the Create an instance page, choose Change SSH
key pair.
-
Choose Create new.
-
Lightsail displays the AWS Region where you're creating the new key. Choose
Create.
-
Enter a name for your key pair.
Resource names
-
Must be unique within each AWS Region in your Lightsail account.
-
Must contain 2 to 255 characters.
-
Must start and end with an alphanumeric character or number.
-
Can include alphanumeric characters, numbers, periods, dashes, and
underscores.
-
Choose Generate key pair.
-
Continue creating your instance.
Store the private key in a secure location. Don't share it publicly because it can be
used to connect to your instances.
This is the only time you can download the private key of the custom key pair.
Lightsail does not store the private key of custom key pairs. After you close this prompt,
you will not be able to download it again.
You can configure your new custom key on new instances that you create in the AWS Region
where you uploaded your key. To configure your new custom key on instances that were
previously created and are currently running, see Change the key pair for your
Lightsail instance.