Why can't I use SSH to connect to my Elastic Beanstalk instance?

1 minute read
0

I can't use SSH to connect to the Amazon Elastic Compute Cloud (Amazon EC2) instances in my AWS Elastic Beanstalk environment.

Resolution

Before use SSH to connect to your instance, complete the following steps:

Note: Make sure to configure an Amazon EC2 key pair for your Elastic Beanstalk environment.

  1. Launch your Amazon EC2 instance in a public subnet, and have a public IP address.
  2. Configure an inbound rule on port 22 on the security group of your instances. The inbound rule must allow your IP address or range of IP addresses to connect to your instance.
  3. Meet all the general prerequisites to connect to your instance.

If your Amazon EC2 instance is in a private subnet, then troubleshoot your SSH connection through a bastion host.

If you still experience timeout issues and can't connect to your instance, then your instance's SSH daemon might be crashing because of high memory utilization. To troubleshoot memory issues, use Amazon CloudWatch metrics to monitor the memory metrics of your Elastic Beanstalk instances.

AWS OFFICIAL
AWS OFFICIALUpdated 8 months ago