DEV Community

Cover image for Part 2 - Create an instance of EC2 and connect with SSH
Sebastian
Sebastian

Posted on

Part 2 - Create an instance of EC2 and connect with SSH

Hi!

Create an instance of EC2 (Amazon Elastic Compute Cloud) allows execute instances of virtual machines, on the AWS infrastructure.

Some features of EC2 are Scalability, personalized configuration, Security, and pay-by-use.

Create an instance of EC2 (Amazon Elastic Compute Cloud) allows execute instances of virtual machines, on the AWS infrastructure.

Some features of EC2 are Scalability, personalized configuration, Security, and pay-by-use.

  • Create an EC2 and connect with SSH
    1. Go to the EC2 service.
    2. On the left menu, click on Instances.
    3. Add a new name to the instance
    4. Let Amazon Linux, everything that has the free tier label.
    5. Create a key pair.
    6. Add a name
    7. and let the RSA and .pem options be selected.
    8. Click on the Create key pair button.
    9. Save in a secure place on your laptop or PC.

1

  • Create a security group:
    1. Allow SSH traffic from
    2. Click Lunch instance.
    3. Check the instances.
    4. Click on the connect button.
    5. Select the SSH client tab
    6. Follow the steps. Note: if you are in Windows, use the git bash terminal if the connection with another terminal shows an unprotected private key file! message.

2

After connect:

3

  • Check the instances:
    1. If you want to check the instances from your CLI, type
aws ec2 describe-instances
Enter fullscreen mode Exit fullscreen mode
  • Delete the instance:
    1. Go to your instance
    2. Choose Instance State
    3. Select Terminate Instance

See you next time!

Top comments (0)