Javascript required
Skip to content Skip to sidebar Skip to footer

Ssh Key Pair Upload to Aws Lightsail

‹ Return to How tos

Download and set PuTTY to connect using SSH in Amazon Lightsail

Last updated: April 11, 2022

You tin use an SSH client similar PuTTY to connect to your Lightsail example. PuTTY requires a copy of your individual SSH key. You might already accept a key, or you might want to use the key pair that Lightsail creates. Either manner, we've got you covered. For more data nigh SSH, see SSH and connecting to your Lightsail instance. This topic walks yous through the steps to download a central pair and set up PuTTY to connect to your instance.

The method to connect to your instance described in this guide is i of many. For more information about the other methods, see SSH and connecting to your Lightsail instance.

The easiest way to connect to your Linux or Unix example in Lightsail is past using the browser-based SSH client that is available in the Lightsail console. For more than information, encounter Connecting to your Linux or Unix case in Amazon Lightsail.

Prerequisites

  • You need a running instance in Lightsail. For more information, encounter Create an example in Amazon Lightsail.

  • We recommended that you create a static IP address and attach information technology to your instance so you won't have to reconfigure PuTTY if your public IP address changes later. For more information, see Create a static IP and attach it to an example in Amazon Lightsail.

Pace one: Download and install PuTTY

PuTTY is a free implementation of SSH for Windows. You can acquire all about PuTTY on this page, including restrictions related to countries where encryption isn't allowed. If you already take PuTTY, you can skip to Step two.

  1. Download the PuTTY installer or executable file from the following link: Download PuTTY.

    If you lot need aid deciding which download to choose, come across the PuTTY documentation. We recommend using the latest version.

  2. Go on to Step 2 to get your private cardinal before you configure PuTTY.

Stride 2: Go your individual key ready

You take several options for getting your individual key. You lot might want to employ the default individual key that Lightsail generates, y'all might desire to take Lightsail create a new private key for you, or you might already have i from some other service. The steps for each of these options is outlined in the following procedures:

  1. Sign in to the Lightsail console.

  2. Cull Business relationship on the top navigation bar, and then cull Account from the drop-down.

  3. Cull the SSH Keys tab.

  4. Choose one of the following options depending on which private cardinal yous prefer to use:

    • To employ the default private central that Lightsail generates, in the Default keys section of the page, choose the download icon next to the default private primal for the AWS Region where your instance is located.

      SSH key pairs in the Lightsail console
    • To create a new fundamental pair in Lightsail, in the Custom keys department of the page, cull Create fundamental pair. Cull the AWS Region where your instance is located, and choose Create. Enter a proper name, and choose Generate primal pair. You will be given the option to download the private primal.

      Of import

      You can merely download the private key one time. Salve it in a secured location.

    • To use your own key pair, choose Upload New. Choose the AWS Region where your instance is located, and choose Upload. Choose Upload file, and and so locate the file in your local bulldoze. Choose Upload key when you lot're ready to upload your public fundamental file to Lightsail.

  5. If you downloaded the private cardinal, or you created a new private key in Lightsail, and so make sure to relieve the .pem fundamental file somewhere you can easily find it.

    We as well recommend that you ready permissions for the file so that no i else can read it.

Step 3: Configure PuTTYgen with your Lightsail private key

Now that you have a re-create of your .pem key file, you can set upward PuTTY using the PuTTY Key Generator (PuTTYgen).

  1. Start PuTTYgen (for example, from the Beginning carte du jour, choose All Programs, PuTTY, PuTTYgen).

  2. Choose Load.

    Past default, PuTTYgen displays only files with the .ppk extension. To locate your .pem file, select the option to display files of all types.

  3. Cull lightsailDefaultKey.pem, and then press Open.

    PuTTYgen confirms that you successfully imported the cardinal, and then you can choose OK.

  4. Choose Relieve individual key, and then confirm y'all don't want to save information technology with a passphrase.

    If you cull to create a passphrase every bit an extra measure of security, retrieve yous volition demand to enter it every time y'all connect to your instance using PuTTY.

  5. Specify a name and a location to save your private key, then choose Relieve.

  6. Close PuTTYgen.

Step 4: End configuring PuTTY with your private primal and case information

You're almost in that location! Hang on while we make i last change.

  1. Open up PuTTY.

  2. From Lightsail, grab the public IP accost (hopefully you're using a static IP address) from the case management page.

    Y'all can get the public IP accost from the Lightsail dwelling folio, or choose your instance to view more details nearly it.

  3. Type (or paste) the public IP address into the Host Proper noun (or IP address) field.

    Note

    Port 22 is already open for SSH on your Lightsail case, and then accept the default port.

  4. Under Connection, aggrandize SSH, and so choose Auth.

    PuTTY and the SSH Auth option in the configuration dialog
  5. Choose Scan to navigate to the .ppk file that you lot created in the previous step, and and then choose Open.

  6. Cull Open again, and so choose Yeah to trust this connection in the hereafter.

  7. Log in using one of the post-obit default user names depending on your case operating system:

    • Amazon Linux, Amazon Linux 2, openSUSE, and FreeBSD: ec2-user

    • CentOS instances: centos

    • Debian instances: admin

    • Ubuntu instances: ubuntu

    • "Certified by Bitnami" instances: bitnami

    • Plesk instances: ubuntu

    • cPanel & WHM instances: centos

    For more information about instance operating systems, meet Choosing an image in Lightsail.

  8. Be certain to relieve your connection for future apply.

Next steps

If you need to connect again, meet Connect to your Lightsail instance using PuTTY.

gellatlysteranded.blogspot.com

Source: https://lightsail.aws.amazon.com/ls/docs/en/articles/lightsail-how-to-set-up-putty-to-connect-using-ssh