gpt4 book ai didi

amazon-web-services - 如何通过 SSH 连接到 Redhat EC2 实例?

转载 作者:行者123 更新时间:2023-12-03 08:14:59 25 4
gpt4 key购买 nike

我已阅读 AWS docs这说我应该使用:

ssh -i /path/my-key-pair.pemmy-instance-user-name@my-instance-public-dns-name

但我不知道 my-instance-user-name 应该是什么。


对于 Ubuntu,我总是这样做

ssh -i /path/my-key-pair.pem ubuntu@my-instance-public-dns-name

通过chmod 400/path/my-key-pair.pem更改我的 key 的权限后

最佳答案

对于红帽 (RHEL) it will be ec2-用户。对于其他操作系统,列表为 here :

  • For Amazon Linux 2 or the Amazon Linux AMI, the user name is ec2-user.

  • For a CentOS AMI, the user name is centos or ec2-user.

  • For a Debian AMI, the user name is admin.

  • For a Fedora AMI, the user name is fedora or ec2-user.

  • For a RHEL AMI, the user name is ec2-user or root.

  • For a SUSE AMI, the user name is ec2-user or root.

  • For an Ubuntu AMI, the user name is ubuntu.

  • For an Oracle AMI, the user name is ec2-user.

  • For a Bitnami AMI, the user name is bitnami.

  • Otherwise, check with the AMI provider.

关于amazon-web-services - 如何通过 SSH 连接到 Redhat EC2 实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69703353/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com