即使已经设置了端口22,如何连接到SSH EC2 Amazon [英] How to connect to SSH EC2 Amazon even if port 22 is already set up

查看:89
本文介绍了即使已经设置了端口22,如何连接到SSH EC2 Amazon的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使将端口22设置为任意位置,在与EC2的ssh连接上仍然出现超时错误,我看到了我的用户,并且确实是ec2-user,但是每次都收到超时消息

Im getting Timeout error on ssh connection to EC2 even after set port 22 to anywhere, i see my user and is ec2-user indeed but im getting timeout everytime

我已经尝试重新启动实例并更改为其他安全组,甚至尝试使用Termius软件(MAC上的im)代替命令行,但没有注意...

Im already tried reboot the instance and change to other security group, even try Termius software (im on MAC) instead command line but notheing...

推荐答案

首先,检查您的VPC和该VPC中创建实例的子网.该子网将具有一个路由表,请验证该子网是否已连接到目的地为0.0.0.0/0的Internet网关,否则请通过引用

First of all, check you VPC and subnets inside this VPC in which you have created your instance. The subnet will have a route table, verify that subnet is attached to an Internet Gateway with Destination 0.0.0.0/0, otherwise add one by referring this link. Post this step, check that your security group has an Ingress Rule for port 22 from your ip(select my ip from drop down). You will not get Connection timeout error if these two steps are configured properly.

这篇关于即使已经设置了端口22,如何连接到SSH EC2 Amazon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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