- Newest
- Most votes
- Most comments
One thing to look at.
- Does the Security Group all inbound SSH acces from your IP Address? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
- Are you referencing you local key correctly and did you specify the correct key when setting up your instance?
I don't generally use ssh keys these days to connect to my instances. You may not have to use one either. - I prefer to connect to instance using Systems Manager Session Manager. I find it more secure and since I don't have to manage ssh keys, easier to use. You also don't have to setup exceptions in the security groups to use it. If you are running an Amazon Linux instance the agent is already installed, you just have to give it authorization to access the service. Some details here.
To Use Session manager . .
Here are steps to setup an instance profile on an EC2 instance for AWS Systems Manager Session Manager:
-
Create an IAM role with the required SSM permissions. At a minimum, this role needs the
AmazonSSMManagedInstanceCore
policy attached. -
Create an instance profile and associate the IAM role you created to it. An instance profile allows an EC2 instance to inherit permissions from a role.
-
Modify the security settings of the instance and attach the new instance profile and its associated IAM role to the instance. the preinstalled agent should be now able to communicate with Systems Manager.
-
Make sure appropriate inbound/outbound network access is allowed in your security groups for Systems Manager connectivity.
-
Test connectivity by trying to start a session with the EC2 instance through Session Manager in the AWS console or CLI.
The instance profile will now allow that EC2 instance to have the permissions needed to interface with Session Manager. Here is a link to the Systems Manager Session Manager Setup Guide. . . https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html
Relevant content
- asked 2 years ago
- asked a year ago
- asked 3 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 10 months ago