How to Create EC2 instance for Linux Machine in AWS and How to Access that Machine Through PuTTY.
In this lab we will explore how to create linux ec2 instances in aws and how to access that machine through putty software and how to terminate the linux machine.
Step1: Go to your AWS Management Console and select a region where you want to create an instance of Windows machine.
Step 2: Now go to the search bar and type EC2 . Then you will find EC2 service and click on it.
Step 3: You will find EC2 Dashboard like this image and click on “Launch instance”. You can also create instances by clicking the “Instance (running)” option.
Step 4: Now you will find the Launch an instance page for filling up necessary information for creating a Linux instance. Follow the below instructions :
⇒ Provide the name of your Linux machine. Here I provided a name as “linux-ec2”.
⇒ Select your desired Linux machine. I selected Amazon Linux and I am using free tier eligible service.
⇒ Select your desired instance type. I selected t2.micro type which is free. You can also take other instance type by clicking “compare instance types”
⇒ Now you have to create a login key pair for login through PuTTY. Click on “Create new key pair”. And you will find a window.
⇒ Provide a key pair name, key pair type RSA and private key file format should .ppk **accessed through **PuTTY. By this key pair you can access your Linux machine through PuTTY. Now click on “Create key pair” and the key pair will be downloaded. The key pair must be saved in a secure place.
⇒ Now Setup your Network settings. Click on the “Edit” button to enable the edit option.
⇒ Now select a VPC . I selected a default VPC (Virtual Private Cloud). Then Select Subnet in your availability zone (or you can create a new subnet). Then Enable “Auto-assign public IP”. Now create a security group or you can use default security group or newly created security group by selecting existing security group option. I created a new security group. Provide a security group name and description as your purpose.
⇒ Now add inbound security group rules. Click on the “Add security group rule” button .
⇒ Now add Inbound Security Group Rules for public access. Add Rules for SSH (port: 22), HTTP(port: 80) and assign source type anywhere so that anyone can send requests and get responses from anywhere via Internet.
⇒ You can configure storage from this storage setting. And There is an Advanced details option for allowing advanced configuration. In this Lab we are not going to set up this advanced feature.
⇒ Now click on “Launch instance”. After that Linux ec2 instance will be created within a few seconds.
⇒ Now click on “View all instances”. After that will be redirected to the instances list page. Where your will find all instances.
⇒ Wait until the status 2/2 checks pass . It means your instance is ready to use.
Step 5: Select “linux-ec2” machine and Click on the right bottom upper sign icon for the details of the ec2 machine.
⇒ Now copy the public ip address for login with PuTTY.
**Access Through PuTTY**
Step 6: Go to google and search putty download for windows. And go to www.putty.org then click on “Download PuTTY”.
⇒ Download the putty.exe file according to your computer configuration
⇒ Open putty.exe file by double click.
⇒ your will find this window as like as below image.
⇒ Click on +SSH tab
⇒ Then Click +Auth > Credentials. You will find your computer browsing option. Click on Browse.
⇒ Now upload your ec2 machine’s private key when you downloaded it at the time of creating an ec2 instance. Now Scroll up and find “Session” tab
⇒ Click on “Session” tab and put your ec2 machine’s public IP address (follow step 5 for getting public IP address) and click on “Open”.
⇒ Click on “Accept”.
Step 7: Now will find your ect2 instance Linux machine’s terminal. For login type: ec2-user and press enter.
⇒ Now you are eligible to access Linux ec2 instance of your AWS account
⇒ Create a text file for testing.
→ touch testfile
→ ls
**Terminate This EC2 Machine**
Step 8: Go to Instances list page and click on “Instance state” and click “Terminate instance”
⇒ Click on Terminate. The Linux ec2 instance machine will be terminated within a few seconds.
**Thank You and Pray for me**
Related Keywords:
AWS EC2 instance creation for Linux;
How to create EC2 instance in AWS;
Linux EC2 instance setup on AWS;
Access AWS EC2 Linux instance with PuTTY;
Connecting to AWS EC2 Linux using PuTTY;
Step-by-step guide for AWS EC2 Linux setup PuTTY;
AWS EC2 SSH connection PuTTY tutorial;
AWS EC2 PuTTY private key setup;
Amazon Web Services EC2 Linux instance SSH access;
AWS EC2 Linux machine configuration for PuTTY access;
Kamrul devops; kamrul-hasan-devops; kamrul-hasan-aws-solution-architect; kamrul-devops; kamrul-cloud; kamrul-hasan-devops; kamrul-devops-engineer; devops-engineer; kamrul-hasan-devops-engineer;
Top comments (0)