[英]Unable to download file from aws
I am very new to aws ec2. 我对AWS EC2非常陌生。 I am able to connect to my aws instance through ssh. 我可以通过ssh连接到我的AWS实例。 However, I am getting error when trying to use scp
command to download files from the server to my local machine or upload from local machine to the server. 但是,尝试使用scp
命令将文件从服务器下载到本地计算机或从本地计算机上传到服务器时,出现错误。
here is how I use the command to download a file from aws to my local machine: 这是我使用命令从aws将文件下载到本地计算机的方式:
scp -i C:/users.../MyFile.pem ubuntu@ec2xxxxxx.amazonaws.com: /aws_filepath/xxx
I get error: 我得到错误:
Warning: Indentity file MyFile.pem not accessible:no such file or directory Permission denied (publickey). 警告:身份文件MyFile.pem无法访问:没有此类文件或目录权限被拒绝(公钥)。 cp: omitting directory '/aws_filepath/xxx' cp:省略目录'/ aws_filepath / xxx'
I am not sure where do I specify the file name of the file I want to download? 我不确定在哪里指定要下载的文件的文件名? Could you please check my command and see what is i am doing wrong? 您能检查一下我的命令,看看我在做什么错吗?
Thank you 谢谢
Ok the error is in the path. 好的,错误在路径中。 Use the command in this format. 使用此格式的命令。 Remove c:
also make sure you have the pem file in that path. 删除c:
并确保该路径中有pem文件。
scp -i /users.../MyFile.pem ubuntu@ec2xxxxxx.amazonaws.com: /aws_filepath/xxx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.