scp -r /Applications/XAMPP/htdocs/keypairfile.pem uploads ec2-user@publicdns:/var/www/html
where uploads is a directory returns Permission denied (publicke
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/