connecting to multiple instances of EC2 with ssh

KENDRA SMITH

I just started out with Amazon web services and was able to launch an instance. A friend showed me a sample tutorial of how to connect to AWS with ssh. Pretty neat. I downloaded the key and edited /.ssh/config file. Sample of the config file

Host *
ServerAliveInterval 300

Host <name desired to connect>
 HostName <domain name>
 port 22
 User ubuntu
 IdentityFile /pathname/keyfile

My question is what if i have 2 instances and now i want to ssh to the new instance launched. How will i edit the config file. I'm stuck and also new to Linux(been learning Linux yesterday and it's pretty cool and powerful). Thanks for the help.

TJ-

You can ssh to any ec2 instance by running this on terminal:

ssh -i path_to_pem_file ubuntu@<HostIP_or_NAME>

eg.

ssh -i /temp/root1.pem [email protected]

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Multiple users connecting to AWS EC2 via SSH

From Dev

Launch multiple EC2 instances in parallel

From Dev

Run script on multiple ec2 instances

From Dev

Provision of multiple EC2 instances with Ansible

From Dev

Shared File Systems between multiple AWS EC2 instances

From Dev

The right way to create multiple instances for Load Balancer (EC2)

From Dev

Remotely execute program in multiple EC2 instances and wait for results

From Dev

Launch multiple EC2 instances with name convention

From Dev

Same Kinesis Consumer running on multiple EC2 instances

From Java

How can I confirm SSH fingerprint when connecting to a new Amazon EC2 instance using PuTTY?

From Dev

AWS EC2 - Why is my SSH public key not present when connecting?

From Dev

Permission denied (publickey) when connecting to EC2 via SSH on Mac Mavericks

From Dev

How to manage a lot of SSH connection information of EC2 instances from ubuntu using different .pem files

From Dev

Disable password and enable SSH keygen like AWS EC2 instances

From Dev

Ansible: Trying to create multiple EC2 instances in multiple regions in one shot

From Dev

How to create and run multiple ec2 instances with same configurations and software installed?

From Dev

Can you post to multiple EC2 instances behind an ELB to trigger events?

From Dev

Issue with rufus-scheduler when we have multiple EC2 instances

From Dev

Multiple EC2 Instances outgoing/outbound traffic presented from a single/common IP (not using NAT!)

From Dev

Connecting EC2 to RDS via php

From Dev

Get Ids of terminated EC2 instances

From Dev

Launch EC2 instances with a Name

From Dev

EC2 Instances will not keep elastic IP

From Dev

Deploying EC2 Instances with Jenkins

From Dev

listing EC2 instances by wildcard with Ruby

From Dev

Sort EC2 Instances by Tag Name

From Dev

Zookeeper and SolrCloud on AWS EC2 instances

From Dev

Logging to CloudWatch from EC2 instances

From Dev

Managing Amazon EC2 instances

Related Related

  1. 1

    Multiple users connecting to AWS EC2 via SSH

  2. 2

    Launch multiple EC2 instances in parallel

  3. 3

    Run script on multiple ec2 instances

  4. 4

    Provision of multiple EC2 instances with Ansible

  5. 5

    Shared File Systems between multiple AWS EC2 instances

  6. 6

    The right way to create multiple instances for Load Balancer (EC2)

  7. 7

    Remotely execute program in multiple EC2 instances and wait for results

  8. 8

    Launch multiple EC2 instances with name convention

  9. 9

    Same Kinesis Consumer running on multiple EC2 instances

  10. 10

    How can I confirm SSH fingerprint when connecting to a new Amazon EC2 instance using PuTTY?

  11. 11

    AWS EC2 - Why is my SSH public key not present when connecting?

  12. 12

    Permission denied (publickey) when connecting to EC2 via SSH on Mac Mavericks

  13. 13

    How to manage a lot of SSH connection information of EC2 instances from ubuntu using different .pem files

  14. 14

    Disable password and enable SSH keygen like AWS EC2 instances

  15. 15

    Ansible: Trying to create multiple EC2 instances in multiple regions in one shot

  16. 16

    How to create and run multiple ec2 instances with same configurations and software installed?

  17. 17

    Can you post to multiple EC2 instances behind an ELB to trigger events?

  18. 18

    Issue with rufus-scheduler when we have multiple EC2 instances

  19. 19

    Multiple EC2 Instances outgoing/outbound traffic presented from a single/common IP (not using NAT!)

  20. 20

    Connecting EC2 to RDS via php

  21. 21

    Get Ids of terminated EC2 instances

  22. 22

    Launch EC2 instances with a Name

  23. 23

    EC2 Instances will not keep elastic IP

  24. 24

    Deploying EC2 Instances with Jenkins

  25. 25

    listing EC2 instances by wildcard with Ruby

  26. 26

    Sort EC2 Instances by Tag Name

  27. 27

    Zookeeper and SolrCloud on AWS EC2 instances

  28. 28

    Logging to CloudWatch from EC2 instances

  29. 29

    Managing Amazon EC2 instances

HotTag

Archive