且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法通过腻子连接到Amazon EC2实例

更新时间:2021-08-05 10:24:55

检查事项尝试连接到Amazon EC2实例时:

Things to check when trying to connect to an Amazon EC2 instance:

  • 安全组:确保安全组允许的所需的端口访问(例如80,22),相应的IP地址范围(例如: 0.0.0.0/0 )。这解决了大部分问题。
  • 公开IP地址:查看您正在使用该实例的正确的公网IP​​地址。如果实例停止和启动,它的也许的收到一个新的公网IP​​地址(具体取决于已配置)。
  • VPC配置:访问是在一个虚拟私有云(VPC)需要推出一个EC2实例:
    • 互联网网关
    • A 路由表子网连接到Internet网关
    • NACLs (网络ACLS)通流量允许
    • Security Group: Make sure the security group allows inbound access on the desired ports (eg 80, 22) for the appropriate IP address range (eg 0.0.0.0/0). This solves the majority of problems.
    • Public IP Address: Check that you're using the correct Public IP address for the instance. If the instance is stopped and started, it might receive a new Public IP address (depending on how it has been configured).
    • VPC Configuration: Accessing an EC2 instance that is launched inside a Virtual Private Cloud (VPC) requires:
      • An Internet Gateway
      • A routing table connecting the subnet to the Internet Gateway
      • NACLs (Network ACLS) that permit through-traffic

      如果您能够启动并连接到另一个实例在同一个子网,那么VPC配置似乎是正确的。

      If you are able to launch and connect to another instance in the same subnet, then the VPC configuration would appear to be correct.

      另外要检查将是实际的配置操作系统在该实例本身。某些软件可能会影响使Web服务器/ ssh守护进程运行不正常的配置。当然,这是很难确定无需连接到该实例。

      The other thing to check would be the actual configuration of the operating system on the instance itself. Some software may be affecting the configuration so that the web server / ssh daemon is not working correctly. Of course, that is hard to determine without connecting to the instance.

      如果您是从一个标准的Linux亚马逊的AMI启动, SSH 将随时正常工作。该网站的服务器(端口80)将需要安装软件和配置上的实例,这是你的责任,以维护。

      If you are launching from a standard Amazon Linux AMI, ssh would work correctly anytime. The web server (port 80) would require installation and configuration of software on the instance, which is your responsibility to maintain.