SlideShare a Scribd company logo
How To Connect Amazon AWS EC2 with Key Pair – Linux
i | P a g e
Table of Contents
Overview.......................................................................................................................................................1
Applies To......................................................................................................................................................1
Pre-requisites................................................................................................................................................1
Key Pair .........................................................................................................................................................1
Key Name / Key Pair..................................................................................................................................1
Instance – Public IP ...................................................................................................................................2
Copy Key Pair ............................................................................................................................................2
Modify Permissions...................................................................................................................................2
Connect Instance – Public IP.....................................................................................................................3
Connect Instance – Instance.....................................................................................................................3
How To Connect Amazon AWS EC2 with Key Pair – Linux
1 | P a g e
Overview
The purpose of this guide is to assist the users to connect the Amazon AWS EC2 Instance(s). This guide
demonstrate connecting from a Linux host.
Applies To
Linux Server (Instance)
Pre-requisites
 Key Pair associated with the EC2 Instance
 Download and copy PEM Key to the Linux Box, from where you would like to connect
 Open inbound connection rule for port “22” on the security group associated to the instance
 Public IP association
Key Pair
A key pair is an encrypted RSA Private Key that’s generated and associated to a new instance when you
build it. You can choose existing key pair or create new one.
Note: When you create a new pair ensure that you download the copy of key pair, else you will not be
able to login to the box.
Key Name / Key Pair
You can identify the key pair associated to each instance in the “Key Name”. It is the key pair filename
that is associated when you create a new instance from the Amazon AWS Console.
How To Connect Amazon AWS EC2 with Key Pair – Linux
2 | P a g e
Instance – Public IP
Identify the public IP for the instance, you can find in the instance’s “Public IP” field.
Copy Key Pair
Copy the key pair to the host wherein you are trying to login.
Modify Permissions
Modify the permission for the key pair to “400”, run the below command.
chmod 400 effoneblr.pem
How To Connect Amazon AWS EC2 with Key Pair – Linux
3 | P a g e
Connect Instance – Public IP
Upon setting the permission of the key pair, connect to the instance with the public IP associated to the
instance, invoke the below command
ssh -i "effoneblr.pem" ubuntu@52.1.89.122
Note: Public IP has to be associated to the instance to connect.
Connect Instance – Instance

More Related Content

PDF
How To Configure Amazon EC2 Security Groups
PDF
How To Install and Configure Apache SSL on CentOS 7
PDF
How To Install and Configure SNMP on RHEL 7 or CentOS 7
PDF
How To List Nginx Modules Installed / Complied on CentOS 7
PDF
How To Check IE Enhanced Security Is Enabled Windows PowerShell
PDF
How To Create EBS Snapshot and Restore EBS Snapshot – Linux Instance
DOCX
How to Configure Amazon AWS EC2 Elastic IP Address
PDF
How to Upgrade Openfire on CentOS 7
How To Configure Amazon EC2 Security Groups
How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure SNMP on RHEL 7 or CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Create EBS Snapshot and Restore EBS Snapshot – Linux Instance
How to Configure Amazon AWS EC2 Elastic IP Address
How to Upgrade Openfire on CentOS 7

What's hot (20)

PDF
Batch script for nslookup range of ip address
PDF
Install and Configure RSyslog – CentOS 7 / RHEL 7
PDF
How To Install and Configure Open SSH Server on Ubuntu
PDF
How To Install and Configure AWS CLI on RHEL 7
PDF
How To Check file exists and Delete PowerShell
PDF
How To Create EC2 instance Linux Server
PDF
Connect Amazon EC2 Linux Instance
PDF
How To Configure FirewallD on RHEL 7 or CentOS 7
PDF
Nginx bind() to 0.0.0.0:9080 failed
PDF
How to Install MariaDB Server or MySQL Server on CentOS 7
PDF
How To Configure Apache VirtualHost on RHEL 7 on AWS
PDF
How to Change Hostname in CentOS 7 or RHEL 7
PDF
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7
PDF
How To Configure SNMP Logging on RHEL 7
PDF
How To Install and Configure AWS CLI for Windows
PDF
How To Protect SSH Access with Fail2Ban on RHEL 7
PDF
Installation CentOS 6.3
PDF
How To Disable IE Enhanced Security Windows PowerShell
PDF
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
PDF
How To Configure Amazon EC2 Load Balancer
Batch script for nslookup range of ip address
Install and Configure RSyslog – CentOS 7 / RHEL 7
How To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure AWS CLI on RHEL 7
How To Check file exists and Delete PowerShell
How To Create EC2 instance Linux Server
Connect Amazon EC2 Linux Instance
How To Configure FirewallD on RHEL 7 or CentOS 7
Nginx bind() to 0.0.0.0:9080 failed
How to Install MariaDB Server or MySQL Server on CentOS 7
How To Configure Apache VirtualHost on RHEL 7 on AWS
How to Change Hostname in CentOS 7 or RHEL 7
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7
How To Configure SNMP Logging on RHEL 7
How To Install and Configure AWS CLI for Windows
How To Protect SSH Access with Fail2Ban on RHEL 7
Installation CentOS 6.3
How To Disable IE Enhanced Security Windows PowerShell
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Configure Amazon EC2 Load Balancer
Ad

Viewers also liked (13)

PDF
File Space Usage Information and EMail Report - Shell Script
PDF
How to install and configure firewall on ubuntu os
PDF
How To Audit Server Login and Shutdown or Reboot Activity
PDF
Bash Script Disk Space Utilization Report and EMail
PDF
How to Install and Configure AWS CLI on RHEL 7
PDF
How To Add DVD ISO to YUM Repository in CentOS 6
PDF
TFTP Installation Configuration Guide
PDF
How To Configure VNC Server on CentOS 7
PDF
DNF Failed To Open Cache
PDF
Linux Basic Administration Commands Guide
PDF
How To Manage Yum Packages Interactive Shell
PDF
Shell Script to Extract IP Address, MAC Address Information
PDF
How To Install OpenFire in CentOS 7
File Space Usage Information and EMail Report - Shell Script
How to install and configure firewall on ubuntu os
How To Audit Server Login and Shutdown or Reboot Activity
Bash Script Disk Space Utilization Report and EMail
How to Install and Configure AWS CLI on RHEL 7
How To Add DVD ISO to YUM Repository in CentOS 6
TFTP Installation Configuration Guide
How To Configure VNC Server on CentOS 7
DNF Failed To Open Cache
Linux Basic Administration Commands Guide
How To Manage Yum Packages Interactive Shell
Shell Script to Extract IP Address, MAC Address Information
How To Install OpenFire in CentOS 7
Ad

Similar to How To Connect Amazon AWS EC2 with Key Pair – Linux (20)

DOCX
How to connect amazon aws ec2 with key pair – linux
PPTX
AWS_EC2_Instance_Bharathiyaruniversity.pptx
PPT
sfdx continuous Integration with Jenkins on aws (Part I)
PPTX
Aws overview part 2(compute services)
PPTX
PPTX
Amazon cloudtutorial
PPTX
Module 1 introduction to aws demo 4
PDF
Aws amazon ec2
PPTX
Creating and managing amazon ec2 instances(linux)
PPT
How to begin with Amazon EC2?
PPTX
Presentation.pptx
PPTX
Presentation-1.pptx
PDF
Moving Drupal to the Cloud
PPTX
Shutdown that bastion host!
PPT
Justmeans power point
PPT
Justmeans power point
PPTX
Aws ec2 setup
PDF
Security compute services_whitepaper
PDF
SSH.pdf
PDF
AWS essentials EC2
How to connect amazon aws ec2 with key pair – linux
AWS_EC2_Instance_Bharathiyaruniversity.pptx
sfdx continuous Integration with Jenkins on aws (Part I)
Aws overview part 2(compute services)
Amazon cloudtutorial
Module 1 introduction to aws demo 4
Aws amazon ec2
Creating and managing amazon ec2 instances(linux)
How to begin with Amazon EC2?
Presentation.pptx
Presentation-1.pptx
Moving Drupal to the Cloud
Shutdown that bastion host!
Justmeans power point
Justmeans power point
Aws ec2 setup
Security compute services_whitepaper
SSH.pdf
AWS essentials EC2

More from VCP Muthukrishna (20)

PDF
How to Fix Duplicate Packages in YUM on CentOS 7
PDF
How To Install and Configure GNome on CentOS 7
PDF
How To Connect to Active Directory User Validation
PDF
How To Connect To Active Directory PowerShell
PDF
How To List Files on Remote Server - PowerShell
PDF
How To List Files and Display In HTML Format
PDF
How To Check and Delete a File via PowerShell
PDF
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
PDF
How To Setup SSH Keys on CentOS 7
PDF
Windows PowerShell Basics - How To List PSDrive Info
PDF
Windows PowerShell Basics – How To Create powershell for loop
PDF
How To Construct IF and Else Conditional Statements
PDF
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
PDF
How To Create Power Shell Function Mandatory Parameter Value
PDF
How To Create PowerShell Function
PDF
How To Configure Nginx Load Balancer on CentOS 7
PDF
How To Install and Configure Screen on CentOS 7
PDF
How To Install and Configure Salt Master on Ubuntu
PDF
How To Find Package Installation Date on RHEL 7
PDF
How To Reset root Password on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7
How To Install and Configure GNome on CentOS 7
How To Connect to Active Directory User Validation
How To Connect To Active Directory PowerShell
How To List Files on Remote Server - PowerShell
How To List Files and Display In HTML Format
How To Check and Delete a File via PowerShell
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
How To Setup SSH Keys on CentOS 7
Windows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics – How To Create powershell for loop
How To Construct IF and Else Conditional Statements
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create Power Shell Function Mandatory Parameter Value
How To Create PowerShell Function
How To Configure Nginx Load Balancer on CentOS 7
How To Install and Configure Screen on CentOS 7
How To Install and Configure Salt Master on Ubuntu
How To Find Package Installation Date on RHEL 7
How To Reset root Password on CentOS 7

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Reach Out and Touch Someone: Haptics and Empathic Computing

How To Connect Amazon AWS EC2 with Key Pair – Linux

  • 1. How To Connect Amazon AWS EC2 with Key Pair – Linux i | P a g e Table of Contents Overview.......................................................................................................................................................1 Applies To......................................................................................................................................................1 Pre-requisites................................................................................................................................................1 Key Pair .........................................................................................................................................................1 Key Name / Key Pair..................................................................................................................................1 Instance – Public IP ...................................................................................................................................2 Copy Key Pair ............................................................................................................................................2 Modify Permissions...................................................................................................................................2 Connect Instance – Public IP.....................................................................................................................3 Connect Instance – Instance.....................................................................................................................3
  • 2. How To Connect Amazon AWS EC2 with Key Pair – Linux 1 | P a g e Overview The purpose of this guide is to assist the users to connect the Amazon AWS EC2 Instance(s). This guide demonstrate connecting from a Linux host. Applies To Linux Server (Instance) Pre-requisites  Key Pair associated with the EC2 Instance  Download and copy PEM Key to the Linux Box, from where you would like to connect  Open inbound connection rule for port “22” on the security group associated to the instance  Public IP association Key Pair A key pair is an encrypted RSA Private Key that’s generated and associated to a new instance when you build it. You can choose existing key pair or create new one. Note: When you create a new pair ensure that you download the copy of key pair, else you will not be able to login to the box. Key Name / Key Pair You can identify the key pair associated to each instance in the “Key Name”. It is the key pair filename that is associated when you create a new instance from the Amazon AWS Console.
  • 3. How To Connect Amazon AWS EC2 with Key Pair – Linux 2 | P a g e Instance – Public IP Identify the public IP for the instance, you can find in the instance’s “Public IP” field. Copy Key Pair Copy the key pair to the host wherein you are trying to login. Modify Permissions Modify the permission for the key pair to “400”, run the below command. chmod 400 effoneblr.pem
  • 4. How To Connect Amazon AWS EC2 with Key Pair – Linux 3 | P a g e Connect Instance – Public IP Upon setting the permission of the key pair, connect to the instance with the public IP associated to the instance, invoke the below command ssh -i "effoneblr.pem" ubuntu@52.1.89.122 Note: Public IP has to be associated to the instance to connect. Connect Instance – Instance