{{announcement.body}}
{{announcement.title}}

Set Up AWS EC2 Instance: RedHat Enterprise Linux 8 (RHEL 8)

DZone 's Guide to

Set Up AWS EC2 Instance: RedHat Enterprise Linux 8 (RHEL 8)

See how to set up an AWS EC2 instance - RedHat Enterprise Linux (RHEL8) and to access it remotely using SSH client from a local computer.

· Cloud Zone ·
Free Resource

Amazon EC2 instances are the most widely used Virtual Machines. In general, EC2 or Elastic Compute Cloud instances run on the hypervisors, it's like a remote computer running a Windows or Linux OS on which you can install whatever software you want, including a Web Server running PHP application and a Database Server. 

In this article, I'm gonna show you how to set up an AWS EC2 instance - RedHat Enterprise Linux (RHEL8) and to access it remotely using SSH client from a local computer.

PREREQUISITES:

INSTRUCTIONS:

1. Log in to AWS Management Console, under Services, Click the EC2

AWS Management Console

2. In EC2 Menu, click Instances

EC2 Instances

3. Click Launch Instance to create a new instance

Launching the instance

4. Choose your Amazon Machine Image, in this tutorial I'm gonna select RHEL 8 64-bit (x86), then click Next

Selecting Amazon Machine Image

5. Choose the desire Instance Type, click Next

Selecting Image type

6. On this page, you can configure your desire VPC settings, configure the number of instances for scaling and assign an IAM Role. In my case, I'm gonna leave the default values, click Next

Configure Instance details

7. Configure your desire storage capacity, click Next

Configuring storage capacity

8. Just click Next if you don't want to add a custom tag for your instance. 

Adding custom tag

9. On this page, I'm gonna create a new Security Group and add a rule for SSH port 22

The Source will be my public IP address which will allow me to connect remotely from my computer via SSH.

You can get your own public IP address here https://www.whatismyip.com/what-is-my-public-ip-address/


Getting public IP address

10. Review the configuration and click Lunch

Reviewing configuration

11. On the Dialog Box, select the Create a new key pair and provide a value for the Key Pair Name.

Download the PEM file by clicking Download Key Pair button, we will use the PEM file for SSH authentication.

Click Launch Instances once you have the PEM file.

Launching instances

Launching status

12. The newly created instance status should be running, take note of the Public DNS of the EC2 instance, we will use this on our SSH client.

Using SSH client

13. Open the Git Bash, execute the command ssh -i <PEM file> <username>@<Public DNS>

The default username for RHEL is ec2-user.

You should be able to login successfully.

Logging into instance


That's it, hope this helps!

Topics:
aws ,ec2 ,red hat ,ssh client

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}