RHEL 9 on AWS EC2 with PuTTY

Step-by-step guide to launch RHEL 9 on AWS EC2: create an instance, configure SSH with PuTTY and keys, use sudo, resolve common errors, and consider Rocky Linux or AlmaLinux in the free tier to practice RHCSA and security.

lunes, 18 de agosto de 2025 • 3 min read • Q2BSTUDIO Team

Artificial-Intelligence-

Step 1 Launch a RHEL 9 instance on AWS EC2. Access the AWS Management Console, go to EC2 and select Launch Instances. Assign a recognizable name to the machine, for example rhel9-lab. In Amazon Machine Image search for Red Hat Enterprise Linux 9 and select the most recent version. Choose the instance type according to your needs.

Step 2 Choose the instance type. For those looking to take advantage of the free tier, consider t2.micro or t3.micro as they are eligible in the free tier, but keep in mind that RHEL has a license cost even on a free instance. If you prefer to practice without real costs and maintain RHCSA compatibility, choose Rocky Linux 9 or AlmaLinux 9 as free alternatives very similar to RHEL.

Step 3 Configure the Security Group for SSH. Security groups control traffic to and from your VM. Add an inbound rule of type SSH port 22. As source use My IP for greater security or, if you need flexibility during testing, use Anywhere 0.0.0.0/0 but remember to restrict it in production environments for good cybersecurity practices.

Step 4 Download and convert the AWS key. When launching the instance, AWS will ask to create or use a Key Pair. Download the .pem file and store it in a safe place. To connect from Windows with PuTTY, install PuTTYgen, load the .pem with Load (select All Files if it does not appear), and then save the private key in .ppk format with Save Private Key. PuTTY needs .ppk for authentication; the public key is already on the AWS instance.

Step 5 Connect with PuTTY. Open PuTTY and in Host Name enter ec2-user@your_public_IP_or_DNS. In Connection SSH Auth select your .ppk file as the private key. Click Open and accept the SSH security alert. You should log in as ec2-user or the default user of the AMI.

Step 6 Get root access. AWS disables direct root login for security. To run commands with privileges use sudo. For example, run sudo -i or prepend sudo to commands that require privileges to perform RHCSA practices.

Common problems and solutions. Connection timed out error: check the security group rules and make sure port 22 is open and the source IP is allowed. Server refused our key error: verify that you loaded the correct .ppk in PuTTY and that the instance was launched with the expected key pair. Only works from one location: check if the security group is set to My IP and temporarily change to Anywhere during testing if you need to connect from multiple networks, but remember to restrict it again.

Final tip: To prepare for the RHCSA exam, using AWS with RHEL 9 is convenient and realistic, but if you want to avoid costs while learning Linux, consider Rocky Linux 9 or AlmaLinux 9 on t2.micro within the free tier. Practice sudo, user management, permissions, services, and firewall to be ready for the exam.

About Q2BSTUDIO. At Q2BSTUDIO we are a software development company specialized in custom applications and custom software, in addition to offering artificial intelligence and AI services for businesses, AI agents, cybersecurity, aws and azure cloud services, and business intelligence services including power bi. If you need cloud environments, automation, artificial intelligence solutions, or cybersecurity and custom application development consulting, our team can help you design the ideal solution for your projects.

Contact Q2BSTUDIO for support in AWS and Azure deployments, migrations, cloud architecture, applied artificial intelligence projects, AI agents, and Power BI dashboards that improve decision-making in your company.

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.