How do I enable SSH for my AWS-EB instance?

老子叫甜甜 提交于 2019-12-01 11:44:04

Using the EB CLI to do eb ssh --setup is the most straightforward way. But it will require you to have permissions to pass roles, and access ec2 security groups.

In order to add ssh to any environment, all you need to do is assign an ssh keypair to the environment. If you already have an ec2 keypair setup, then you can make this assignment using the Elastic Beanstalk Web console. Otherwise, you will have to create a keypair first.

To add ssh to your EB instances, first make sure you know which policy it currently uses. In your EB web console, go to the environment and then Configuration and then Instances. You'll see the Instance profile name there.
Now go to the your IAM console and locate that role. Here's the policy I have there, which allows me to add SSH to the environment:
{ "Version": "2015-01-14", "Statement": [ { "Action": [ "autoscaling:Describe*", "cloudwatch:*" ], "Effect": "Allow", "Resource": "*" } ] }

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!