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
KeyPair..............................................................................................................................................1
KeyName / 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 PEMKey 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’sgenerated and associated to a new instance whenyou
build it. You can choose existing key pair or create new one.
Note: Whenyou create a newpair ensure that you downloadthe copy of key pair, else youwill not be
able to login to the box.
Key Name / Key Pair
You can identify the keypair 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 settingthe permissionof the keypair, connectto the instance withthe publicIP associatedtothe
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

DOCX
How to Configure Amazon AWS EC2 Elastic IP Address
PDF
How To Create EC2 instance Linux Server
PDF
How To Connect Amazon AWS EC2 with Key Pair – Linux
DOCX
How to configure amazon ec2 load balancer
PDF
Amazon AWS Identity Access Management
PPTX
Cluster Computing for $0.27/hr using Amazon EC2 and IPython Notebook
PPTX
Security enabling at amazon cloud (presntation)
PDF
Apache Kafka with AWS s3 storage
How to Configure Amazon AWS EC2 Elastic IP Address
How To Create EC2 instance Linux Server
How To Connect Amazon AWS EC2 with Key Pair – Linux
How to configure amazon ec2 load balancer
Amazon AWS Identity Access Management
Cluster Computing for $0.27/hr using Amazon EC2 and IPython Notebook
Security enabling at amazon cloud (presntation)
Apache Kafka with AWS s3 storage

Viewers also liked (19)

PDF
Gerenciando e implantando suas aplicações na Nuvem da AWS
PDF
Desenvolvimento Ágil de Aplicações Java na Nuvem com o AWS Elastic Beanstalk
PPTX
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...
PDF
NETWORK SECURITY USING LINUX INTRUSION DETECTION SYSTEM
ODP
How to Diagnose Problems Quickly on Linux Servers
PPTX
Linux Audit By Kaustubh Padwad
PPTX
Scheduling in Linux and Web Servers
PDF
How To Manage Yum Repositories
PPTX
The Nits and Grits of Git
PPTX
Earth's hydrosphere SanDiego
PPT
Samba server
PPTX
Mastering GIT
ODP
Nagios Conference 2013 - Sam Lansing - Getting Started With Nagios XI, Core, ...
PDF
Samba server configuration
PDF
How to configure Nagios in Fedora ?
PDF
Bash Script - How To Monitor Application Error Logs and Send Notification
PDF
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
PPTX
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
ODP
Docker - The Linux container
Gerenciando e implantando suas aplicações na Nuvem da AWS
Desenvolvimento Ágil de Aplicações Java na Nuvem com o AWS Elastic Beanstalk
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...
NETWORK SECURITY USING LINUX INTRUSION DETECTION SYSTEM
How to Diagnose Problems Quickly on Linux Servers
Linux Audit By Kaustubh Padwad
Scheduling in Linux and Web Servers
How To Manage Yum Repositories
The Nits and Grits of Git
Earth's hydrosphere SanDiego
Samba server
Mastering GIT
Nagios Conference 2013 - Sam Lansing - Getting Started With Nagios XI, Core, ...
Samba server configuration
How to configure Nagios in Fedora ?
Bash Script - How To Monitor Application Error Logs and Send Notification
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Docker - The Linux container
Ad

Similar to How to connect amazon aws ec2 with key pair – linux (20)

PDF
Connect Amazon EC2 Linux Instance
PPTX
AWS_EC2_Instance_Bharathiyaruniversity.pptx
PPT
sfdx continuous Integration with Jenkins on aws (Part I)
PPTX
Aws overview part 2(compute services)
PPTX
Amazon cloudtutorial
PPTX
Module 1 introduction to aws demo 4
PPTX
PDF
Aws amazon ec2
PPT
How to begin with Amazon EC2?
PPTX
Presentation.pptx
PPTX
Presentation-1.pptx
PDF
Moving Drupal to the Cloud
PPTX
Creating and managing amazon ec2 instances(linux)
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 project jenkins-build-server
Connect Amazon EC2 Linux Instance
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
How to begin with Amazon EC2?
Presentation.pptx
Presentation-1.pptx
Moving Drupal to the Cloud
Creating and managing amazon ec2 instances(linux)
Shutdown that bastion host!
Justmeans power point
Justmeans power point
Aws ec2 setup
Security compute services_whitepaper
SSH.pdf
Aws project jenkins-build-server
Ad

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
How To Install and Configure Open SSH Server on Ubuntu
PDF
Windows PowerShell Basics - How To List PSDrive Info
PDF
How To List Nginx Modules Installed / Complied on CentOS 7
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 Disable IE Enhanced Security Windows PowerShell
PDF
How To Check IE Enhanced Security Is Enabled Windows PowerShell
PDF
How To Configure Nginx Load Balancer 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
How To Install and Configure Open SSH Server on Ubuntu
Windows PowerShell Basics - How To List PSDrive Info
How To List Nginx Modules Installed / Complied on CentOS 7
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 Disable IE Enhanced Security Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Configure Nginx Load Balancer on CentOS 7

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 KeyPair..............................................................................................................................................1 KeyName / 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 PEMKey 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’sgenerated and associated to a new instance whenyou build it. You can choose existing key pair or create new one. Note: Whenyou create a newpair ensure that you downloadthe copy of key pair, else youwill not be able to login to the box. Key Name / Key Pair You can identify the keypair 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 settingthe permissionof the keypair, connectto the instance withthe publicIP associatedtothe 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