3
votes

I've created single instances in the past and am familiar with the process:

  • Create keypair
  • Use keypair when setting up instance
  • ssh using "ssh -i path/to/key.pem [email protected]"

This is what I get when I try to connect using "-vvv"

OpenSSH_6.0p1 Debian-3ubuntu1.2, OpenSSL 1.0.1c 10 May 2012

debug1: Reading configuration data /home/tha_user/.ssh/config

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 19: Applying options for *

debug2: ssh_connect: needpriv 0

debug1: Connecting to XXXXXX.elasticbeanstalk.com [23.23.182.171] port 22.

debug1: connect to address 23.23.182.171 port 22: Connection timed out

ssh: connect to host XXXXX.elasticbeanstalk.com port 22: Connection timed out

The timeout seems like a firewall rule somewhere is blocking me, but the keypair has the inbound rule of "Accept TCP port 22 from anywhere." Is there anything else in the AWS system that might be blocking me? I'm still quite new to AWS and it's various systems and rules.

1
Sometimes it helps to check your own, local firewall for port 22.djvg

1 Answers

10
votes

Are you sure you are using the correct IP address for your EC2 instance, and not the "elastic beanstalk" IP address? I do not believe that the ec2 instances in the beanstalk have public dns, just IP address. But the fact you have elasticbeanstalk.com in your SSH command makes me think your doing it wrong.

To ssh to the ec2 instance, you need to find the instances in your EC2 console. From their get the public IP address, and try to ssh to that instead of the beanstalk.com DNS.

I usually create a pem file just for each of my beanstalkers, and that way I can tell which EC2 instances are a part of which beanstalk by the pems.