Build dashboards & reports in minutes

  • Features
  • Pricing
  • Blog
  • What is Ubiq
  • Free Trial

Connect to Amazon EC2 Linux instance from Linux/Mac using SSH

November 27, 2013September 21, 2021 Sreeram Sreenivasan

Last updated on September 21st, 2021 at 11:08 am

Here’s how you can connect to Amazon EC2 Linux instance from your Linux/Mac laptop using SSH:

Step 1: Create amazon ec2 instance with a new key pair

Step 2: Save your private key to a known location (it’s a .pem file you’ll download in the process)

Step 3: In the EC2 dashboard go the the security group settings for the instance and open ssh port 22

security group

Step 4: Make sure the folder with the private key has appropriate access otherwise it won’t work (e.g, chmod -R 700 path/to/key).

Step 5: Type the following in shell:

ssh -i path/to/key/myKey.pem ec2-user@my-ec2-public-ip.amazonaws.com

e.g, ssh -i tmp/myKey.pem root@ec2-198-51-100-1.compute-1.amazonaws.com

You may see the warning (e.g, public ip of Amazon EC2 instance is ‘198.51.100.1’)

The authenticity of host 'ec2-198-51-100-1.compute-1.amazonaws.com (10.254.142.33)'
can't be established.
RSA key fingerprint is 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f.
Are you sure you want to continue connecting (yes/no)?

Step 6: Enter yes

Warning: Permanently added 'ec2-198-51-100-1.compute-1.amazonaws.com' (RSA) 
to the list of known hosts.

Related posts:

How to Search a File in Linux

How to List All Processes in Linux

How to Uninstall NVIDIA Drivers in Ubuntu

How to Calculate CPU Utilization in Linux

Sreeram Sreenivasan

Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI & software development.

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on WhatsApp (Opens in new window) WhatsApp
Linux amazon, amazon key pair, aws, aws security group, chmod, connect, connect to linux instance, ec2, ec2 dashboard, host permission, ip address, linux, login permission, mac, pem file, port number, remoteaccess, ssh. permalink.

Post navigation

Connect to Amazon EC2 Linux instance from Windows using PuTTy

About Us



Ubiq is a business intelligence & reporting tool for small & medium businesses. Build business dashboards, charts & reports in minutes. Get insights from data quickly. Try it for free!




Data Reporting
  • MySQL Reporting Tools
  • PostgreSQL Reporting Tools
  • Online Reporting Tools
  • Web Reporting Tools
  • Redshift BI Reporting
  • SQL Reporting Tools
Business Intelligence
  • BI Solution
  • BI Reporting Software
  • MySQL BI Reporting Tools
  • Self Service BI
  • SaaS BI
Data Visualization
  • Data Visualization Tools
  • Data Analysis Tools
  • Visual Analytics
  • MySQL Charts
  • MySQL Graph Generator
  • MySQL Report Builder
  • Online Report Generator
  • Redshift Data Visualization
Dashboards
  • Dashboard Builder
  • Dashboard Reporting Software
  • Dashboard Creator
  • KPI Dashboard Software
Quicklinks
  • Contact Us
  • Docs
  • Jobs
  • BI Blog
  • Database Blog
  • Tech Blog
Resources
  • Security
  • Privacy
  • T&C
  • Sitemap
dazzling Theme by Colorlib Powered by WordPress