How to access your AWS Linux instance using an SSH client ?

To access your AWS instance, you will need “.pem” file as generated in “How to start Amazon AWS EC2 Instance ?”

Generating “.pem” file required for SSH to your AWS Instance

Once you click on “Launch” you will be asked to generate key pair which you can use to “SSH” to your AWS instance.

In above, click on “Create a new key pair”

5

set the “Key pair name” and click on “Download Key Pair”

Accessing AWS instance over SSH using .pem file

In this post, we will show how you can ssh to your AWS Linux instance from your machine’s terminal. We have attempted to access Linux AWS instance from our Ubuntu laptop,


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Related :   How to use domain name instead of public DNS / IP in Amazon Linux EC2 instance ?

In below command,

  • /home/devlab/Downloads/ – directory where we download the .pem file from AWS dashboard
  • my-key-pair.pem – The generated .pem file when you created AWS instance
  • ec2-user => The username of your AWS instance, you can find the users at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html
  • public DNS name / public IP – you can get the this from your AWS instance dashboard.
ssh -i /home/devlab/Downloads/my-key-pair.pem ec2-user@my-instance-public-dns-name

Or you can use your public IP as well,

ssh -i /home/devlab/Downloads/my-key-pair.pem ec2-user@my-instance-public-ip

Reference : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html

lynxbee_ezoic

Leave a Comment

Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded