Pav Sidhu
Pav Sidhu

Reputation: 6944

INFO: Closed port 22 on ec2 instance security group

I'm trying to SSH into my Elastic Beanstalk instance using the EB CLI to access my logs however after entering eb ssh, I get this:

INFO: Attempting to open port 22.
INFO: SSH port 22 open.
ssh: connect to host (IP for the EC2 instance) port 22: Operation timed out
INFO: Closed port 22 on ec2 instance security group.
ERROR: An error occurred while running ssh.

I've set the security group of my ec2 instance to allow inbound ssh from anywhere on port 22 however I still get this error.

What's the issue? Thanks.

Upvotes: 2

Views: 1138

Answers (1)

matesio
matesio

Reputation: 1604

Place your .pem file ~/.ssh folder, then try eb ssh.

As elasticbeanstalk uses codedeploy to deploy your application to ec2 instances you can do direct ssh to AMI EC2 instance. using.

ssh -i securityKey.pem ec2-user@elasticbeanstalkip

Upvotes: 1

Related Questions