![](/img/trans.png)
[英]permission denied public key while copying folder/file from local machine to AWS ec2 instance with scp command in putty
[英]Getting PERMISSION DENIED while copying a file from local to remote using SCP
我正在尝试使用以下命令使用scp
将文件从本地计算机复制到远程计算机:
scp user@xx.xx.xx.xx:/home/user/Testing.txt user@mm.mm.mm.mm:~/
我最终出现以下错误:
Address xx.xx.xx.xx maps to ec2-xx-xx-xx-xx.yyyy.yyyy.yyyyy.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
引导我解决这个错误。
尝试将文件压缩到主文件夹。
scp user@xx.xx.xx.xx:/home/user/Testing.txt user@mm.mm.mm.mm:.
这会将文件复制到主文件夹。 如果以上操作失败,则在ec2实例的情况下,请使用身份文件进行访问。 创建ec2实例时,标识文件可用,并确保对此文件的许可权是400。
scp -i identity_file.pem user@xx.xx.xx.xx:/home/user/Testing.txt user@mm.mm.mm.mm:.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.