[英]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.