Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

How to Connect to Amazon Linux Instance Using SSH?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Pre-requisites: AWS, SSH TOOLS

AWS stands for Amazon Web Services, and it is a cloud computing platform provided by Amazon. AWS provides a range of cloud-based services, including computing power, storage, databases, analytics, machine learning, and many other resources that businesses and individuals can be used to build and run their applications and services. AWS offers a highly scalable, reliable, and secure platform with data centers located around the world. Some of the most popular services provided by AWS include Amazon S3 for object storage, Amazon EC2 for compute power, Amazon RDS for managed relational databases, and Lambda for serverless computing. AWS is widely used by businesses of all sizes, from startups to large enterprises, and it has become the market leader in cloud computing.


SSH(Secure Shell) is a network protocol that provides secure and encrypted communication over an unsecured network. It allows users to securely access and control remote servers and devices over the internet.

SSH provides a secure way to establish a connection between two devices, such as a client and a server, by encrypting the data transmitted between them. This makes it difficult for any unauthorized party to intercept or eavesdrop on the communication, ensuring that sensitive information remains protected.

One of the primary uses of SSH is remote login to servers, allowing users to execute and access files on a remote system as if they were physically present on the machine. SSH also supports other features such as file transfer, port forwarding, and tunneling, making it a versatile tool for system administrators and developers.

For this task we will perform the following operations:

  1. Create a Linux Instance in Amazon AWS.
  2. Using SSH to Connect to Amazon Linux Instance.

Create a Linux Instance in Amazon AWS

Step 1: Click on Launch Instance.

Here have to select the type of instance according to your business need.

Click on launch instance to create an instance


Step 2: Add a Name to the Instance

Here have to give the name and tag to the server so that you can easily identify the server that you created if a bunch of servers are there.

Give the required name to instance


Step 3: Select Linux Instance.

select the Operating system


Step 4: Select the type of Instance

Select the instance type


Step 5: Create a Keypair file

Here have to create a Keypair file that will be asked during initiating a connection with the server for authentication purposes.

create or select the new pair


Step 6: Select the key pair format as .pem

Select the private key file format


Step 7: Select the Security group as per requirement in the network setting

Allow required SSH traffic


Step 8: Next Click on Launch Instance

Give the required number of instance and click on launch instance


Step 9: Now go to View Instance

Instance successfully launched and click on view all instances


Step 10: Select the instance and copy its Public IP address.

In an Amazon Web Services (AWS) instance, the public IP address is the address that is used to access the instance from the internet.

copy the public Ip address


Connect to the Linux Instance using SSH

Step 1: To connect to the Linux instance using SSH open the Windows PowerShell or Command prompt or the applications that support SSH, and use the command to connect to the instance.

> ssh -i /path/of/keypair 

Here we gave the path of the key pair that we downloaded in .pem format.

Connecting to the instance by using SSH tool


Step 2: Now after hitting the command, we will require authorization to connect to the instance. Then you will be logged inside the instance. 

Successfully connected to EC2 instance by using SSH tool


My Personal Notes arrow_drop_up
Last Updated : 28 Mar, 2023
Like Article
Save Article
Similar Reads
Related Tutorials