简体   繁体   English

SCP 在尝试 -i 时无法在 AWS ec2 实例中工作

[英]SCP not working from AWS ec2 instance when trying -i

I am trying to scp a file to my computer with the command:我正在尝试使用以下命令将文件 scp 到我的计算机:

sudo scp -i Documents/Professional/DiscMix/TestFile.pem ec2-user@-----.-----.compute-1.amazonaws.com: /csr.pem

But I keep getting the error: scp: .: not a regular file但我不断收到错误消息: scp: .: not a regular file

What am I doing wrong?我究竟做错了什么?

I see that name of the file to copy is missing.我看到要复制的文件的名称丢失了。 Update your command as shown below to make it work.如下所示更新您的命令以使其工作。

sudo scp filetocopy.csv -i Documents/Professional/DiscMix/TestFile.pem ec2-user@ec2-34-xxx-xx-xxx.compute-3.amazonaws.com:/csr.pem

I didn't put the location to download in the command at the very end.我没有把下载的位置放在最后的命令中。 My final command is: sudo scp -i DiscMixEc2.pem ec2-user@------.------.compute-1.amazonaws.com:~/csr.pem Downloads我的最终命令是: sudo scp -i DiscMixEc2.pem ec2-user@------.------.compute-1.amazonaws.com:~/csr.pem Downloads

 sudo scp -i DiscMixEc2.pem ec2-user@------.------.compute-1.amazonaws.com:/tmp

try first copying it to temporary folder and from there manually copy to u r destination folder.尝试首先将其复制到临时文件夹,然后从那里手动复制到您的 r 目标文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM