How to connect to AWS EC2 instance from local machine | Connect to EC2 instance from local machine

Published: 03 June 2021
on channel: DevOps Coach
22,956
112

https://www.cidevops.com/2018/02/how-...

Pre-requisites:

1. Keys(for e.g., yourkey.pem) already downloaded in your local machine, preferably in Downloads folder.
2. EC2 is up and running
3. For windows laptop, you need to install Git by downloading from this URL - https://git-scm.com/downloads. For Apple laptop you need to download iTerm from here.

Mac Laptop instructions

Open iTerm window, type the below command to go to downloads directory.
cd downloads

For few Mac laptops, it may add .txt in the end of pem file. in that case you need to remove .txt in the end

pwd
and then execute below commands to make sure you are not making keys publicly viewable.
chmod 400 *.pem
Paste the url from example highlighted above in step # 4.
ssh -i "mykey.pem" ubuntu@dns_name.compute.amazonaws.com
type yes when it is asking to connect.


Watch video How to connect to AWS EC2 instance from local machine | Connect to EC2 instance from local machine online without registration, duration hours minute second in high quality. This video was added by user DevOps Coach 03 June 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 22,956 once and liked it 112 people.