Problem to enter my linux instance

0

good day, create an instance in linux connect me from a network for the first time and i have no problem but i try to connect by putty from another network and i can't get a network error

thanks for the help

asked 3 years ago181 views
2 Answers
0

Hi Avanegas,
From my understanding you are trying to connect to your Linux instance using PuTTY from another network but you are getting a network error.

I would advise you to ensure that your Security Group has the correct Inbound and Outbound rules to allow for traffic outside your network to access the instance. As well as checking the Network Access Control List (NACL). For more information on Security Groups: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html and for more information on NACLs: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html

You can check the Security Group by:
• Navigating to the EC2 console https://console.aws.amazon.com/ec2/
• On the left select Instances
• Select the Linux instance you are trying to connect to
• On the Security tab at the bottom of the console page, under Inbound rules, check the list of rules that are in effect for the selected instance - for Linux instances: Verify that there is a rule that allows traffic from the network (IP address range) that your computer is connected to, to port 22 (SSH).
• You can also check under Outbound rules, that all traffic is allowed out

You can check the NACL by:
• Navigating to the EC2 console https://console.aws.amazon.com/ec2/
• On the left select Instances
• Select the Linux instance you are trying to connect to
• On the Networking tab at the bottom of the console page, click your VPC ID
• Select the VPC, and on the Details tab click Main network ACL
• For Inbound Rules, verify that the rules allow traffic to reach the VPC. Otherwise, delete or modify the rule that is blocking traffic.
• For Outbound Rules, verify that the rules allow traffic to leave the VPC. Otherwise, delete or modify the rule that is blocking traffic.

It could also be, that since you are trying to connect from another network, that there is a firewall blocking your access. Please ensure, if there is a firewall, that it allows the necessary inbound and outbound traffic for connecting to the instance. For example, port 22 for Linux instances.

Please check your route table for the subnet that the instance is in. Verify that there is a route with 0.0.0.0/0 as the destination and the internet gateway for your VPC as the target. You can check by:
• Navigating to the EC2 console https://console.aws.amazon.com/ec2/
• On the left select Instances
• Select the Linux instance you are trying to connect to
• On the Networking tab at the bottom of the console page, click your VPC ID
• Select the VPC, and on the Details tab click Main route table
• Under the Routes tab, you can check the routes

From what you have described, if you are getting this error message - Network error: Connection timed out or Error connecting to instance, reason: -> Connection timed out: connect , try the following the troubleshooting steps here:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectionTimeout

With regards to connecting to a Linux instances using PuTTY you can view the official AWS doc to ensure you satisfy the prerequisites:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
You can view this document with regards to troubleshooting other common errors when trying to connect: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html

I hope this helps! Please let me know if you have any questions.

Edited by: amz99 on May 28, 2021 8:14 AM

amz99
answered 3 years ago
0

thank you, you saved my life

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions