- Newest
- Most votes
- Most comments
Hello.
For EC2 instances, please allow SSH in the inbound rules of the security group associated with the EC2 instance.
Add the following rules to your inbound rules:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html#sg-rules-local-access
Instructions on how to edit security group rules are provided in the following document:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/changing-security-group.html#add-remove-security-group-rules
Also, if you have edited the network ACL rules for the subnet in which the EC2 instance is running from the default, make sure to set the network ACL inbound rules to allow SSH and the outbound rules to allow ephemeral ports.
https://docs.aws.amazon.com/vpc/latest/userguide/custom-network-acl.html
For EC2 instances, depending on the OS, there are options that allow you to connect without using SSH by configuring it, so I recommend that you also check the following documentation.
https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/connect-to-an-amazon-ec2-instance-by-using-session-manager.html
Relevant content
asked 3 years ago
