首页 > 解决方案 > SCP not working from AWS ec2 instance when trying -i

问题描述

I am trying to scp a file to my computer with the command:

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

What am I doing wrong?

标签: linuxamazon-web-servicessslamazon-ec2scp

解决方案


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

推荐阅读