amazon-web-services - 我可以在没有 PEM 文件的情况下将文件复制到 Amazon EC2(使用 AWS CLI)吗?

标签 amazon-web-services ubuntu amazon-ec2

我曾经使用下面的 scp 命令将文件从本地机器复制到较早的实例。scp -i /path/to/pem/file /path/to/source user@ip-address:/path/to/destination但是对于一个新实例,我无权访问 PEM 文件。我们使用 AWS CLI 来管理对新实例的访问,因此不需要 PEM 文件。是否也可以使用 AWS CLI 复制文件?
PS:我使用的是 Ubuntu 20.10(如果有帮助的话)

最佳答案

您可以使用AWS Systems Manager Session Manager使用 scp 复制文件:

With SSH protocol tunneling using Session Manager, you do not need an access server or an open inbound port for SSH-based access and SCP-based file copy. This reduces cost and improves your security posture when using SSH and SCP.

关于amazon-web-services - 我可以在没有 PEM 文件的情况下将文件复制到 Amazon EC2(使用 AWS CLI)吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67296070/

相关文章:

ubuntu - 在 Docker 容器中添加 PPA 失败

amazon-web-services - 一台大EC2、多台小EC2、一台ECS,哪个划算?

amazon-web-services - AWS SSM 代理 - 使用 aws cli,有没有办法列出所有缺少 SSM 代理的 AWS 实例?

amazon-web-services - 模板错误: Every default member must be a string Coludformation yml

python - Boto 不会将 s3 文件保存到 AWS Lambda 上的光盘

amazon-web-services - Windows 中程序文件中的 Cloudformation cfinit 命令

git - 无法克隆 Git 存储库。 ~/.ssh/id_rsa 在 git 中验证

ubuntu - SLURM Controller 和 "Worker"是否可能在同一个节点中?

mysql - 无法在EC2上同时运行Jenkins和MySQL的Docker容器

amazon-web-services - 如何让自己免于 AWS 费用?