linux - 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?
解决方案
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
推荐阅读
- c++ - OpenSSL BN_sub() 不能做有符号减法
- swagger - 使用 aws-api-gateway 模型,我如何要求对象包含至少 1 个有效密钥
- javascript - 有没有办法将多个相同的对象添加到购物车?
- asp.net - 如果有两个字段,如果一个为空,则在 TemplateField 中显示空白
- docker - Docker for Desktop Kubernetes 无法连接到服务器:拨号 tcp [::1]:6445
- c# - 有没有办法在 UWP 应用程序中使用 WUApiLib API?
- php - 访问另一个类中的一个类的数组而不在php中传递参数
- javascript - 使用 JavaScript 获取多个选定的文本选项
- jsp - 如何修复我用于方法级别安全性的角色层次结构
- python - 是否可以像使用 Java 的 Eclipse 一样在 Python 中使用 Pycharm 浏览函数?