Hands-On: Store the SSH Key

Learn to store the SSH key securely on AWS S3 to access it from within the Educative terminal.

Store the SSH key on AWS S3 for later use

AWS S3 is an online object storage that supports encryption, so our SSH key will be safe there. Later in this course, we’ll look at all the details about S3. For now, it’s just important to know that S3 stores objects (similar to files) in buckets. The path of an object is like the path of a file on a computer.

So let’s now create a new bucket by following these steps:

  1. Open the S3 console to create a new bucket. For this, please type “S3” into the search bar of the AWS Console.

  2. We’re forwarded to the S3 Dashboard. Please click on “Create Bucket” on the S3 Dashboard.

  3. In the next screen, we need to give our bucket a name. Note that we chose educative-sca-on-aws, but because bucket names need to be unique across all AWS accounts, you need to specify your own bucket name. If you picked a name that is already in use, AWS will give you an error message.

  4. After we’ve picked the name, it’s important to leave the default access settings as they are (“Block all access” is enabled). This protects our S3 bucket from unwanted access, and we will be the only one to access it.

  5. Next, enable “Encryption” under “Default Encryption.” By enabling this, every file that we upload is encrypted by default on AWS. AWS manages the encryption key for us. We can leave the default encryption method (“SSE-S3”). Then, click “Create bucket.”

  6. After we’ve created the bucket, we’re redirected to the S3 Dashboard and see our new bucket there. Now, it’s time to upload our SSH key (hello-wordpress.pem) into the bucket. To do so, click on the bucket name to get to the bucket page.

  7. On the bucket page, click “Upload” to upload a file. We’re forwarded to the upload page. On the upload page, click “Add files.”

  8. Please choose your hello-wordpress.pem file on your computer to upload it. The dialog will obviously look different for you if you’re using Windows or Linux.

  9. After we’ve added the file, it shows up in the list on the upload page.

  10. Now, scroll all the way to the bottom and click the “Upload” button to confirm the upload.

  11. Once the upload is finished, we should see the page with a green “Upload succeeded” message. Please scroll down and click the hello-wordpress.pem file on the bottom to open the file properties page.

  12. On the file properties page, copy the S3 URI by either clicking the button on the top or copying the URI directly. This S3 URI allows us to access the file directly, for example, through the AWS CLI.

Get hands-on with 1200+ tech skills courses.