Skip to content

Open port 22 for ssh connection on an EC2 instance

Marc Grossouvre edited this page Oct 11, 2019 · 2 revisions

Path

  • -> EC2 Dashboard
  • -> Instances
  • -> click your instance
  • -> in Description tab, click on the security group name
  • -> in the Inbound tab, check the presence of the following line :

Type : SSH ; Protocol : TCP ; Port Range : 22 ; Source : 0.0.0.0/0

  • If the SSH entry is here, it means that your port is open
  • If the SSH entry is not here, you can add it :
    • -> Edit
    • -> Add Rule
    • -> (enter parameters) -> Save

Security warnings

  1. With the above parameters, your port is open to the world (Amazon will probably warn you about that), if you want your port to be open only to your PC, enter your public IP address in the Source field.
  2. As mentionned above, your really modify the security group, not the instance. It means that any other instance running on the same security group will have an SSH port open too.