I just signed up for Amazon's new Elastic Beanstalk offering. What I can't figure out is how to SSH to a Beanstalk instance. I don't have a private key because Beanstalk generated the instance on my behalf.
I found it to be a 2-step process. This assumes that you've already set up a keypair to access EC2 instances in the relevant region.
elasticbeanstalk-default
security group if you have launched an Elastic Beanstalk instance in that region.Edit the security group to add a rule for SSH access. The below will lock it down to only allow ingress from a specific IP address.
SSH | tcp | 22 | 22 | 192.168.1.1/32
Existing Key Pair
field. Once the instance has relaunched, you need to get the host name from the AWS Console EC2 instances tab, or via the API. You should then be able to ssh onto the server.
$ ssh -i path/to/keypair.pub [email protected]
Note: For adding a keypair to the environment configuration, the instances' termination protection must be off as Beanstalk would try to terminate the current instances and start new instances with the KeyPair.
Note: If something is not working, check the "Events" tab in the Beanstalk application / environments and find out what went wrong.