Using scp to copy a file to Amazon EC2 instance? You can use scp command to copy a file from your local system to an EC2 instance as shown in the below example – Default scp -i /path/to/your/.pemkey -r /copy/from/path user@ec2_ip_or_dns_name:/copy/to/path 1 scp -i /path/to/your/.pemkey -r /copy/from/path user@ec2_ip_or_dns_name:/copy/to/path Tags: aws, EC2, FAQ