-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Documentation on how to configure SSH for EC2 with Elastic Beanstalk #23
Comments
Steps to Create a New .pem Key Pair and Use it for SSH Open the AWS Management Console and navigate to the EC2 Dashboard. In the left-hand menu, under Network & Security, select Key Pairs. Name: Give your key pair a descriptive name (e.g., my-eb-key). Move the .pem File to Your Linux Machine: If you're on the same machine you’ll be connecting from, skip this step. Otherwise, transfer the .pem file to your Linux machine securely, using a method such as SCP. bash On your Linux machine, ensure the key pair has the correct permissions: Navigate to the Instances section in the EC2 Dashboard. Create an Image (AMI) from the Instance: After the instance is stopped, select it, click Actions → Image and templates → Create Image. Once the image is created, go to AMIs in the left-hand menu under Images. If you want to replace the instance managed by Elastic Beanstalk with this new instance, you can manually adjust the Elastic Beanstalk configuration, but in most cases, simply SSHing into this new instance is enough. In the EC2 Dashboard, click Security Groups in the left-hand menu. Locate the security group used by your Elastic Beanstalk environment or the new instance you just launched. Select the security group and click Edit Inbound Rules. In the EC2 Dashboard, go to Instances. Use the .pem key to SSH into the instance from your Linux terminal: |
When creating a key pair in AWS, you will be asked to choose the key type between RSA and ED25519. Here’s a brief explanation to help you choose: Key Types: Widely supported: RSA is the most widely supported key type across all systems, tools, and services. ED25519 (Edwards-curve Digital Signature Algorithm): Newer and faster: ED25519 keys are faster for signing and verification compared to RSA. They also use smaller keys and are optimized for performance. Which to Choose? |
To create a script in Linux that opens a terminal and connects to an SSH server using a .pem file, follow these steps:Steps to Create a Script for SSH Connection: For example: bash Script to connect to an EC2 instance via SSHssh -i "/path/to/my-eb-key.pem" ec2-user@ /path/to/my-eb-key.pem with the actual path to your .pem file (e.g., ~/.ssh/my-eb-key.pem). Run the following command to give the script execute permissions: bash |
No description provided.
The text was updated successfully, but these errors were encountered: