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

前端 未结 5 746
轻奢々
轻奢々 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条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 10:50

    transferring file from local to remote host

    scp -i (path of your key) (path for your file to be transferred) (username@ip):(path where file to be copied)

    e.g scp -i aws.pem /home/user1/Desktop/testFile   ec2-user@someipAddress:/home/ec2-user/
    

    P.S. - ec2-user@someipAddress of this ip address should have access to the destination folder in my case /home/ec2-user/

提交回复
热议问题