无法通过 SSH 进入 EC2 实例

无法通过 SSH 进入 EC2 实例

我一直在关注这些ec2 设置说明当我到达最后需要使用的地方时

ssh -i path/to/myapp.pem [email protected]

我收到以下错误

$ ssh -i ~/keys/scriptishsitekey.pem ec2-blah.compute-1.amazonaws.com
The authenticity of host 'ec2-blah.compute-1.amazonaws.com (1.2.3.4)' can't     be established.
RSA key fingerprint is ..
Are you sure you want to continue connecting (yes/no)? yes 
Warning: Permanently added 'ec2-blah.compute-1.amazonaws.com,1.2.3.4' (RSA) to the list of known hosts.
Permission denied (publickey).

我隐藏了一些细节,但我使用的信息应该是正确的,知道可能是什么问题吗?

答案1

尝试使用ec2-user而不是ubuntu

你的命令将是:

ssh -i path/to/myapp.pem [email protected]

相关内容