我尝试使用我通常的设置连接到正在运行的 ec2 实例,它返回
ssh: connect to host ec2 port 22: Connection timed out
我尝试使用内置的“EC2 Instance Connect”连接,直接从浏览器连接到 AWS 帐户,它返回
There was a problem setting up the instance connection An error
occurred and we were unable to connect or stay connected to your
instance. If this instance has just started up, try again in a minute
or two.
该实例运行了数周,我是唯一有权访问 AWS 账户和 SSH 密钥的用户,并且在过去约 3 周内我没有更改任何设置或重新启动它
第一次超时开始〜1周前,然后没有任何其他更改,我的网站(wordpress)突然开始显示数据库连接错误(EC2实例内部的数据库也是如此)
我用来连接的:要么
ssh -i "Keys.pem" ec2-user@ec2-[public ip].eu-west-3.compute.amazonaws.com
或者
ssh ec2-user@[public ip] -i "Keys.pem"
两者都显示相同的错误。几周前我使用了第一个,它曾经运行良好