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

What's hot (20)

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

Viewers also liked (13)

PDF
File Space Usage Information and EMail Report - Shell Script
VCP Muthukrishna
 
PDF
How to install and configure firewall on ubuntu os
VCP Muthukrishna
 
PDF
How To Audit Server Login and Shutdown or Reboot Activity
VCP Muthukrishna
 
PDF
Bash Script Disk Space Utilization Report and EMail
VCP Muthukrishna
 
PDF
How to Install and Configure AWS CLI on RHEL 7
VCP Muthukrishna
 
PDF
How To Add DVD ISO to YUM Repository in CentOS 6
VCP Muthukrishna
 
PDF
TFTP Installation Configuration Guide
VCP Muthukrishna
 
PDF
How To Configure VNC Server on CentOS 7
VCP Muthukrishna
 
PDF
DNF Failed To Open Cache
VCP Muthukrishna
 
PDF
Linux Basic Administration Commands Guide
VCP Muthukrishna
 
PDF
How To Manage Yum Packages Interactive Shell
VCP Muthukrishna
 
PDF
Shell Script to Extract IP Address, MAC Address Information
VCP Muthukrishna
 
PDF
How To Install OpenFire in CentOS 7
VCP Muthukrishna
 
File Space Usage Information and EMail Report - Shell Script
VCP Muthukrishna
 
How to install and configure firewall on ubuntu os
VCP Muthukrishna
 
How To Audit Server Login and Shutdown or Reboot Activity
VCP Muthukrishna
 
Bash Script Disk Space Utilization Report and EMail
VCP Muthukrishna
 
How to Install and Configure AWS CLI on RHEL 7
VCP Muthukrishna
 
How To Add DVD ISO to YUM Repository in CentOS 6
VCP Muthukrishna
 
TFTP Installation Configuration Guide
VCP Muthukrishna
 
How To Configure VNC Server on CentOS 7
VCP Muthukrishna
 
DNF Failed To Open Cache
VCP Muthukrishna
 
Linux Basic Administration Commands Guide
VCP Muthukrishna
 
How To Manage Yum Packages Interactive Shell
VCP Muthukrishna
 
Shell Script to Extract IP Address, MAC Address Information
VCP Muthukrishna
 
How To Install OpenFire in CentOS 7
VCP Muthukrishna
 
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
VCP Muthukrishna
 
PPTX
AWS_EC2_Instance_Bharathiyaruniversity.pptx
srideviramaraj2
 
PPT
sfdx continuous Integration with Jenkins on aws (Part I)
Jérémy Vial
 
PPTX
Aws overview part 2(compute services)
Parag Patil
 
PPTX
AWS
Jai Sipani
 
PPTX
Amazon cloudtutorial
Chris Buenaventura
 
PPTX
Module 1 introduction to aws demo 4
Ganesh Bhosale
 
PDF
Aws amazon ec2
Sentinel Solutions Ltd
 
PPTX
Creating and managing amazon ec2 instances(linux)
Pradeep Sunny
 
PPT
How to begin with Amazon EC2?
Cuelogic Technologies Pvt. Ltd.
 
PPTX
Presentation.pptx
Himabindu905359
 
PPTX
Presentation-1.pptx
sasanapurijahnavi
 
PDF
Moving Drupal to the Cloud
Ari Davidow
 
PPTX
Shutdown that bastion host!
MichaelLudvig
 
PPT
Justmeans power point
justmeanscsr
 
PPT
Justmeans power point
justmeanscsr
 
PPTX
Aws ec2 setup
Suresh Kannaiyan
 
PDF
Security compute services_whitepaper
saifam
 
PDF
SSH.pdf
AnisSalhi3
 
PDF
AWS essentials EC2
mustafa sarac
 
How to connect amazon aws ec2 with key pair – linux
VCP Muthukrishna
 
AWS_EC2_Instance_Bharathiyaruniversity.pptx
srideviramaraj2
 
sfdx continuous Integration with Jenkins on aws (Part I)
Jérémy Vial
 
Aws overview part 2(compute services)
Parag Patil
 
Amazon cloudtutorial
Chris Buenaventura
 
Module 1 introduction to aws demo 4
Ganesh Bhosale
 
Aws amazon ec2
Sentinel Solutions Ltd
 
Creating and managing amazon ec2 instances(linux)
Pradeep Sunny
 
How to begin with Amazon EC2?
Cuelogic Technologies Pvt. Ltd.
 
Presentation.pptx
Himabindu905359
 
Presentation-1.pptx
sasanapurijahnavi
 
Moving Drupal to the Cloud
Ari Davidow
 
Shutdown that bastion host!
MichaelLudvig
 
Justmeans power point
justmeanscsr
 
Justmeans power point
justmeanscsr
 
Aws ec2 setup
Suresh Kannaiyan
 
Security compute services_whitepaper
saifam
 
SSH.pdf
AnisSalhi3
 
AWS essentials EC2
mustafa sarac
 
Ad

More from VCP Muthukrishna (20)

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

Recently uploaded (20)

PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Biography of Daniel Podor.pdf
Daniel Podor
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 

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" [email protected] Note: Public IP has to be associated to the instance to connect. Connect Instance – Instance