Monday, May 6, 2019

How to connect to an EC2 instance from Windows or IMac?

Pre-requisites:

1. SSH keys(for e.g., myEc2Jenkins.pem) already downloaded in your local machine, preferably in downloads folder.
2. Your EC2 instance is up and running in AWS
3. For windows laptop, you need to use Git bash. You can install Git by downloading from this URL - https://git-scm.com/downloads

Steps to connect to EC2 instance:

1. Go to AWS console.
2. Click on EC2, click on running instances link





3. Select the checkbox of EC2 you would like to connect to.
4. Click on Action. Copy the url from SSH which looks like below:
For e.g.
ssh -i "mykey.pem" ubuntu@dns_name.compute.amazonaws.com



For windows machine(and also for iMac))

1. Open Git bash
2. type pwd
It may print your directory in git bash
3. Now type cd downloads
4. make sure you have keys in the downloads directory by typing the below command:
  dir  *.pem

The above command should list all the pem files in the downloads directory.

only for Macbook pro laptops, you need to perform additional step
chmod 400 myJenkinsEc2KKey.pem

5. Now paste the url from step # 4 above
ssh -i "mykey.pem" ubuntu@dns_name.compute.amazonaws.com
type yes

6. now you should be in AWS cloud, screen should tell you something like this:

Last login: Sun month 18 19:01:21 2018 from 64.183.186.78
ubuntu@ip-172-31-26-96:~$

2 comments:

  1. Saya mendapatkan banyak pelajaran dari artikel ini.
    Selain itu, hiburan saya biasanya dengan mencoba keberuntungan di TOTO MACAU.
    Situs favorit saya tentu JAPRITOTO., yang sudah terbukti terpercaya.

    ReplyDelete
  2. Informasi yang bermanfaat! Saya juga sering mengunjungi japritoto dan totomacau untuk hiburan online. Artikel ini mengingatkan saya betapa pentingnya mencari sumber terpercaya.

    ReplyDelete

Complete DevSecOps Learning Roadmap for 2026 to become a DevSecOps Engineer | Top DevSecOps Skills for 2026 | Skills required to become a DevSecOps engineer | DevSecOps Learning RoadMap for 2026

Complete DevSecOps Roadmap We all know how DevOps is trending right now. And we know where it is going. Let's get to know what skills wi...