【发布时间】:2022-01-21 21:26:50
【问题描述】:
直到今天,我们都能够使用连接详细信息通过 ssh 连接到 EC2 实例;当它停止工作并出现以下错误时:
root@DKERP:~# ssh -i "gindustries.pem" ubuntu@ec2-15-184-231-34.me-south-1.compute.amazonaws.com
ssh: connect to host ec2-15-184-231-34.me-south-1.compute.amazonaws.com port 22: Connection timed out
另外,到公共 IP 和端口 22 的 telnet 不起作用
root@DKERP:~# telnet 15.184.231.34 22
Trying 15.184.231.34...
telnet: Unable to connect to remote host: Connection timed out
会话管理器也无法连接并出现以下错误:
We weren't able to connect to your instance. Common reasons for this include:
SSM Agent isn't installed on the instance. You can install the agent on both Windows instances and Linux instances.
The required IAM instance profile isn't attached to the instance. You can attach a profile using AWS Systems Manager Quick Setup.
Session Manager setup is incomplete. For more information, see Session Manager Prerequisites.
AWS 配置中没有防火墙。
概述: 安全组: 实例: 网络接口: 专有网络: 网络 ACL:
系统日志在这里更新:https://pastebin.com/RhAG5DzP
请提出建议。
【问题讨论】:
-
Web ssh 客户端(轻松连接)也不起作用?
-
不起作用@Marcin
-
可能实例冻结了。您是否尝试重新启动它或启动新的?
-
您是否尝试通过会话管理器登录并检查
ufw?我试图在您的实例端口 80 上远程登录,它是“可用的”(也许您应该全部关闭它)所以问题不在于连接性。也许防火墙阻止了端口 22 -
重启也无济于事
标签: amazon-web-services amazon-ec2 connection timeout telnet