无法连接到 Ec2 实例:“端口 22 上的连接被拒绝”

无法连接到 Ec2 实例:“端口 22 上的连接被拒绝”

过去我曾两次成功登录我的 ec2。现在当我尝试登录时,出现此错误

ssh -vvv -i "test.ppk" [email protected]
OpenSSH_7.1p2, OpenSSL 1.0.1g 7 Apr 2014
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-11-162-345-000.compute-1.amazonaws.com [56.187.068.298] port 22.
debug1: connect to address 56.187.068.298 port 22: Connection refused
ssh: connect to host ec2-11-162-345-000.compute-1.amazonaws.com port 22: Connection refused

经过一番研究,我认为这是因为我第一次登录实例时,我在家里。第二次,我在别人家里。所以也许我的 IP 地址现在被禁止进入。我正在使用允许所有连接的默认安全组,所以我不知道接下来该怎么做。

相关内容