Connection refused on new EC2 Instance putty

时光怂恿深爱的人放手 提交于 2019-12-31 03:02:19

问题


I've created an instance of a server on EC2 based on an AMI generated from an existing server. All goes well during the create, and I specify the same key for the new server as the old. However, when I try to connect to the new server via putty, I get a "connection refused" message. Also, I'm unable to ping to the public address, although I selected the "default" group which allows ICMP. The server status is "running". Any ideas why I can't connect?

Note that an nmap probe gives this output:

PORT      STATE  SERVICE
22/tcp    closed ssh
80/tcp    closed http
2144/tcp  closed unknown
10000/tcp closed snet-sensor-mgmt

I'm pretty sure this means that ssh isn't running, although the port is open. Any idea why it would be running on the system I did the AMI from, but not on the one the AMI was generated from? Shouldn't all the same services be starting?


回答1:


It did turn out to be a security group/permissions issue. The default security group looks open, but actually shuts everything down, per this post:

https://serverfault.com/questions/245916/why-cant-i-ssh-or-ping-my-brand-new-amazon-ec2-instance




回答2:


as you are taking the existing AMI you have to delete all the old entries from authenticated file except new entry. because while the coping the AMI old entries are still present in new instance so once you will delete it you may able to login into the instance.




回答3:


One Reason i found is entry in WLAN in current working network i.e. of my office. you may have restrictions.try contacting network admin.

alternatively you can try for adding entry to inbound rule of your current ip address.



来源:https://stackoverflow.com/questions/28467118/connection-refused-on-new-ec2-instance-putty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!