简体   繁体   English

AWS网络连接失败:连接超时

[英]AWS network connection failed: Connection timed out

I setup an Ubuntu EC2 instance and that was working fine and I allocated an elastic IP to my instance. 我设置了一个Ubuntu EC2实例,并且运行良好,并且为实例分配了一个弹性IP。 But recently I am trying to connect to my instance using SSH putty and WinSCP from my windows but it throws connection timed out error. 但是最近我尝试从Windows使用SSH腻子和WinSCP连接到我的实例,但是它引发连接超时错误。 I have already checked the following things 我已经检查了以下内容

  1. SSH port 22 enabled in Security groups 在安全组中启用了SSH端口22 在此处输入图片说明

  2. My other AWS account is running via putty so there is no firewall issue in my system. 我的另一个AWS帐户通过腻子运行,因此系统中没有防火墙问题。

  3. After allocating to elastic IP, I have changed the IP in Putty. 分配给弹性IP后,我更改了Putty中的IP。

  4. Restarted the EC2 instance 重新启动EC2实例

  5. Connect the security group to my EC2 instance. 将安全组连接到我的EC2实例。

Please help me. 请帮我。 It worked a couple of times already and I successfully logged into the instance but now getting the connection timed out error. 它已经工作了几次,我成功登录到实例,但是现在出现连接超时错误。

Your security group looks fine . 您的安全组看起来不错。 Hope You have assigned your own VPC & Subnet for your instance.Even if its default or user defined , Please check below points and try again. 希望您已经为实例分配了自己的VPC和子网。即使它是默认的或用户定义的,也请检查以下几点,然后重试。

  1. In routing table select mapped routing table : In routes check whether associated VPC has routes to Internet gateway.(Destination should be 0.0.0./0 and Target should be your IGW). 在路由表中选择映射的路由表:在路由中,检查关联的VPC是否具有到Internet网关的路由(目标应为0.0.0./0,目标应为您的IGW)。
  2. Check Subnet Associations :whether your subnet associated or not . 检查子网关联:您的子网是否关联。 If not, do associate and do ssh now .. 如果没有,请立即关联并执行ssh。

I have created mentioned issue in my Account and I have followed above steps to fix the issue . 我已经在我的帐户中创建了提到的问题,并且已按照上述步骤解决了该问题。 Its worked for my self . 它为我自己工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM