Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Copy file from one ec2 instance to other

suppose you want to transfer file from the second instance(ec2-2) to first instance(ec2-1), the command should be run in ec2-1 is:

scp -i /Path-To-Key-File-for-ec2-2/key.pem ec2-user@Elastic-IP-of-ec2-2:/path/filename your/local-path-on-ec2-1/filename