linux - 无法登录到我的 aws spot 实例,即使它正在运行

标签 linux amazon-web-services amazon-ec2 ec2-ami

我无法登录我的 aws spot 实例,即使它正在运行。我无法通过 ssh 或 scp 访问我的数据。我知道我的 pem key 适用于其他实例,因此这不是 pem key 的问题。

ssh -i my_pem_key.pem ubuntu@my_dns_name 我得到 权限被拒绝(公钥)。

如何检索正在运行的 spot 实例中的数据? 我尝试创建实例的镜像 (AMI) 并登录到新实例,但效果不佳。

最佳答案

这里可能会发生一些事情。您是否尝试过以下方法?

  • 确保您实例上的安全设置设置为使用相同的 PEM 凭据
  • 验证您尝试连接的服务器的 DNS 或 IP 地址是否正确

来自亚马逊文档:

Verify that you are connecting with the appropriate user name for your AMI. Enter the user name in the Host name box in the PuTTY Configuration window.

  • For an Amazon Linux AMI, the user name is ec2-user.
  • For a RHEL5 AMI, the user name is either root or ec2-user.
  • For an Ubuntu AMI, the user name is ubuntu.
  • For a Fedora AMI, the user name is either fedora or ec2-user.
  • For SUSE Linux, the user name is root.

    Otherwise, if ec2-user and root don't work, check with the AMI provider.

此外,

Verify that you have an inbound security group rule to allow inbound traffic to the appropriate port.

问候

关于linux - 无法登录到我的 aws spot 实例,即使它正在运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26612198/

相关文章:

.htaccess - 通过 AWS Lambda 重定向 URL

amazon-web-services - 有没有人在使用 AWS kinesis 流、lambda 和 firehose 时遇到过数据丢失的情况?

laravel - getenv 在 EC2 服务器中不起作用

http - 亚马逊负载均衡器返回错误代码 400

linux - CLOCK_REALTIME 和 CLOCK_MONOTONIC 的区别?

c++ - 我可以用 C++ 编写基于以太网的网络程序吗?

java - Amazon Cognito 开发人员使用 Java SDK 验证身份

linux - 接手在 EC2 上运行的项目并遇到访问问题

python - 检查非 root 用户是否可以访问路径

amazon-web-services - 如何将 EBS 支持的 AMI 从 AWS 下载到本地计算机?