不能够通过SSH到新的命令行创建的实例 [英] Not able to SSH to new command line created instance

查看:232
本文介绍了不能够通过SSH到新的命令行创建的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用下面的命令创建一个新的实例,

I'm creating a new instance by using the following command,

EC2-运行情况--keyXXXX密钥对--instance型t1.micro --instance启动关机 - 行为终止--user数据文件myscript.sh $ ami_id

和我的AMI是汇出默认AMI

我启动实例后,用从我的旧的实例以下code连接新实例,

after I launch the instance, used the following code from my older instance to connect new instance,

的ssh -i xxx_yyy.pem bitnami@xxxxxx.compute-1.amazonaws.com

和我无法连接这一点,有服务器没有响应,

And I can't connect this, there is no response from server,

任何人都可以请帮我在这??

Can anyone please help me in this??

在此先感谢。

推荐答案

典型的东西来检查试图连接到一个EC2实例时:

Typical things to check when trying to connect to an EC2 instance:

安全组 检查与实例相关联的安全组中的至少一个具有端口22(SSH)或端口3389(RDP)开到你的源IP地址范围(例如,一个特定的IP地址54.87.23.11/32,还是整个世界0.0.0.0 / 0 - 但后者是很差的安全习惯)。安全组是有状态的,所以你只需要打开内向访问和返回路径会自动工作。

Security Groups Check that at least one of the Security Groups associated with the instance has port 22 (SSH) or port 3389 (RDP) open to your source IP range (eg a specific IP address 54.87.23.11/32, or the whole world 0.0.0.0/0 -- but the latter is very poor security practice). Security Groups are stateful, so you only need to open Inbound access and the return path will automatically work.

公开IP地址 请确认您使用的是与实例相关联的公网IP​​地址。这可以在例如发射被分配(这会从池中分配一个随机的IP地址),也可以指定为弹性IP地址(这是可以分配分配给任何实例,你保留它,直到你一个静态IP地址释放回AWS)。

Public IP Address Confirm that you are using a Public IP address associated with the instance. This can either be assigned at instance launch (which will allocate a random IP address from a pool) or can be assigned as an Elastic IP Address (which is a static IP address that you can assign assign to any instance and you keep it until you release it back to AWS).

公开子网/路由 确认您的实例在公用VPC子网。这意味着,与子网相关联的路由表具有通过因特网网关的路由。

Public Subnet / Routing Confirm that your instance is in a "Public" VPC Subnet. This means that the Route Table associated with the Subnet has a route through an Internet Gateway.

AMI操作系统 我见过的情况下,人们尝试使用SSH到Windows实例,或RDP到Linux实例,因此也请检查您推出了正确的AMI您预期的操作系统。

AMI Operating System I've seen situations where people try to SSH to a Windows instance, or RDP to a Linux instance, so also check that you launched the correct AMI for your expected operating system.

这篇关于不能够通过SSH到新的命令行创建的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆