SCP Permission denied (publickey). on EC2 only when using -r flag on directories

前端 未结 5 745
轻奢々
轻奢々 2021-01-30 10:41

scp -r /Applications/XAMPP/htdocs/keypairfile.pem uploads ec2-user@publicdns:/var/www/html

where uploads is a directory returns Permission denied (publicke

5条回答
  •  -上瘾入骨i
    2021-01-30 10:53

    If you want to upload the file /Applications/XAMPP/htdocs/keypairfile.pem to ec2-user@publicdns:/var/www/html, you can simply do:

    scp -Cr /Applications/XAMPP/htdocs/keypairfile.pem/uploads/ ec2-user@publicdns:/var/www/html/

    Where:

    • -C - Compress data
    • -r - Recursive

提交回复
热议问题