简体   繁体   English

无法通过 SSH 连接到 Amazon EC2 实例

[英]Unabled to SSH into Amazon EC2 instance

I have created AWS free tier account for practicing certification.我已经创建了 AWS 免费套餐帐户以进行认证。 I am facing issue in SSHing to the instance from laptop and the browser based EC2 CLI.我在从笔记本电脑和基于浏览器的 EC2 CLI SSH 连接到实例时遇到问题。

I am using the ssh command shown in connect manual.我正在使用连接手册中显示的 ssh 命令。

I changed the outgoing rule for security group to custom to point to my ip but got same results.我将安全组的传出规则更改为自定义以指向我的 ip,但得到了相同的结果。
(Custom) SSH, TCP, 22,19x.xx.xx.xx/32 (自定义) SSH, TCP, 22,19x.xx.xx.xx/32

(Anywhere) SSH, TCP, 22, 0.0.0.0/0, ::/0 (任何地方)SSH、TCP、22、0.0.0.0/0、::/0

I tried the same in couple in other availability zone but could not ssh.我在其他可用区中尝试了相同的方法,但无法 ssh。

question is not clear prassank... if you are trying to access from your machine to aws ec2.问题不清楚 prassank ... 如果您尝试从您的机器访问 aws ec2。 Please allow your ISP(Internet service provider) ip into inbound rule of security group.请允许您的 ISP(Internet 服务提供商)ip 进入安全组的入站规则。 Please do not open to all.请不要对所有人开放。 as it is breaching the security to your system.因为它破坏了您系统的安全性。

In case of you are not able.please do let me know.如果你不能,请告诉我。

The AWS Free Tier is a pricing discount. AWS 免费套餐是一种定价折扣。 It has no impact on how your services operate, so is not relevant for your situation.它对您的服务的运作方式没有影响,因此与您的情况无关。

Things to check when trying to SSH into the EC2 instance:尝试通过 SSH 连接到 EC2 实例时要检查的事项:

  • The EC2 instance should be in a public subnet EC2 实例应位于公有子网中
  • You should connect using the EC2 instance's public IP address您应该使用 EC2 实例的公共 IP 地址进行连接
  • The Security Group associated with the EC2 instance should permit:与 EC2 实例关联的安全组应允许:
    • Inbound access from your IP address on port 22从您的 IP 地址在端口 22 上进行入站访问
    • It is recommended to leave the default outbound access to permit ALL traffic on ALL ports建议保留默认出站访问权限以允许所有端口上的所有流量

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

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