Wednesday, October 20, 2021

How to remotely SSH into AWS ec2 Linux instances

Must Read

After setting up Linux (Amazon Linux, Ubuntu, CentOS, RHEL, etc.) running ec2 Instance on AWS cloud computing platform we can use SSH to connect and control it remotely; instead of using the console directly from ec2 Dashboard.

Well, the Linux OS running on Ec2 instances come with a pre-installed OpenSSH server. Hence, we just need to generate an SSH key pair or private that will help us to log in it remotely but securely.

SSH is a secure shell protocol that default uses port number 22 to connect remote systems. To use it, the remote system must be running on SSH servers such as OpenSSH, then only any client machine will be able to connect remotely.


2. Go to ec2 Dashboard
Once you log in to your AWS account you will see the AWS Management Console. On the left top side, click on the Service drop Menu to select EC2.

Generate SSH to connect AWS ec2 Linux Instances
1. log in to AWS
First of all, go to the AWS login page to access all the cloud services offered by it.

Login to Ec2 AWS account

3. Create Key Pair
Once you are on the ec2 Dashboard, scroll down and from the left side select “Key Pairs” and then click on the “Create Key Pair“.

Create Key Pairs 4. Create Private SSH ec2 key
Now, you will see a page to select some options such as giving a name to your key, pair type, and format of Key file. Choose as per your requirement and then click on the “Create key pair” button.

Save the key on your local system, somewhere, securely. Create SSH ec2 Key Pair

5. Go to your Instance
Now, from the left side panel, select the Instances option. And click on the Instance ID that you want to connect over SSH remotely. Also, note down the Public Ip-address attached to your Instance because we need it to connect and access the same remotely over SSH.

Note: Well, if you don’t have any running instances then create a new one using the “Launch Instances” button given on the top right side. Copy AWS Instance Public Ip address

6. Connect to ec2 Instance over SSH
To connect your Linux or Windows AWS ec2 instance over SSH you can either use some dedicated SSH client application such as Putty or MobaXterm. Alternatively, just open your Windows or Linux PC command terminal and ssh your remote machine using the steps given here. Using Putty
If you are a Putty user on Windows, then here are the steps to follow.

News Summary:

  • How to remotely SSH into AWS ec2 Linux instances
  • Check all news and articles from the latest Security news updates.
Disclaimer: If you need to update/edit this article then please visit our help center. For Latest Updates Follow us on Google News

More Articles Like This

Latest News