简体   繁体   English

AWS EC2-连接超时-SSH

[英]AWS EC2 - Connection Timed out - SSH

I am new to AWS. 我是AWS的新手。 Luanched an EC2 instance and set it up to server a Laravel application. 启动EC2实例并将其设置为服务器Laravel应用程序。 Out of nowhere I am not able to SSH into the instance (which was working fine) 我无法无处通过SSH进入实例(工作正常)

Network error: Connection timed out 网络错误:连接超时

The application is accessible through browser. 该应用程序可通过浏览器访问。 But not able to SSH into the instance. 但无法通过SSH进入实例。

Since your application is accessible for browser, I hope you know how to configure the inbound connections. 由于浏览器可以访问您的应用程序,因此希望您知道如何配置入站连接。 I believe your machines IP address has changed due to which you are not able to access. 我相信您的机器IP地址已更改,导致您无法访问。 Your IP can change if you have reset/switch on/off the Internet or if you are connecting from a different Internet connection after the initial server configuration. 如果您已重置/打开/关闭Internet,或者在初始服务器配置后从其他Internet连接进行连接,则IP可能会更改。

You need to follow these steps 您需要按照以下步骤

Open the inbond connection for SSH 打开SSH的inbond连接
1. EC2 bashboard - > click the respective Security Group 1. EC2控制面板->单击相应的安全组
2. Select the Public SG - > click inbond tab 2.选择公共SG->单击“绑定”选项卡
3. Add an entry SSH | 3.添加条目SSH | TCP | TCP | 22 | 22 | Select MyIP 选择MyIP

Kind Regards 亲切的问候
Robin 罗宾

请使用用户ec2-user@52.14.24.61

Could it be that you are trying to SSH into the instance from a corporate network, or one that does not allow outbound connections on port 22 (ssh) ? 可能是您要尝试从公司网络通过SSH进入实例,还是要在端口22(ssh)上不允许出站连接? See my answer here: https://stackoverflow.com/a/45634848/981913 在这里查看我的答案: https : //stackoverflow.com/a/45634848/981913

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

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