简体   繁体   English

Amazon Web Services-Mac ssh上的EC2实例操作超时

[英]Amazon Web Services - EC2 instance operation timed out on mac ssh

I am trying to connect to my EC2 instance through SSH on Terminal. 我正在尝试通过终端上的SSH连接到我的EC2实例。 I am able to access the instance on CoRD, but I cannot access it on SSH or RDP through Microsoft Remote Desktop Connection. 我可以在CoRD上访问该实例,但是无法通过Microsoft远程桌面连接在SSH或RDP上访问它。 I am just trying to learn the system, so I am using the default security group which is opening all ICMP, TCP, UDP ports. 我只是想学习系统,所以我使用的是默认的安全组,该组将打开所有ICMP,TCP,UDP端口。

This seems to be the same problem I was having. 这似乎是我遇到的相同问题。 I was able to solve it by using suggestions given on this stackoverflow question . 我能够通过使用此stackoverflow问题上给出的建议来解决此问题 I think the confusion is with the default security group. 我认为混乱与默认安全组有关。 What it shows in front of it as "All ports" does not mean that all ports are open, but rather that the security group includes all ports. 它前面显示为“所有端口”的内容并不意味着所有端口都是打开的,而是安全组包括所有端口。 I am including the steps I took, hoping it would help, if you haven't figured it out by now. 我正在包括我采取的步骤,希望对您有所帮助,如果您现在还没有弄清楚的话。

  1. On the sidebar, under Network and Security , choose Security Groups . 在边栏的“ Network and Security ,选择“ Security Groups
  2. On the list of the security groups shown, choose the one you want to configure to allow an inbound connection ( default VPC security group in this example). 在显示的安全组列表中,选择要配置以允许入站连接的default VPC security group (此示例中为default VPC security group )。
  3. On the bottom of the page, choose Inbound tab and press Edit. 在页面底部,选择“ Inbound选项卡,然后按“编辑”。
  4. For type, choose SSH or RDP. 对于类型,选择SSH或RDP。 The protocol will be automatically set to TCP, the port range to 22 and for the source if you choose My IP , it will set it to your computer's IP. 该协议将自动设置为TCP,端口范围将设置为22,对于源,如果您选择My IP ,它将设置为您计算机的IP。
  5. After finishing these steps, simply start your instance and connect to it using SSH or RDP. 完成这些步骤后,只需启动您的实例并使用SSH或RDP连接到它。

These steps worked for me but I am a beginner and learning, so there may have been some other small details that I may have missed. 这些步骤对我有用,但是我是一个初学者,正在学习,因此可能还有其他一些我可能错过的小细节。 If others notice it, I'm sure they will point it out. 如果其他人注意到它,我相信他们会指出。

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

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