Skip to content

Instantly share code, notes, and snippets.

@jsbonso
Created May 13, 2019 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jsbonso/fe22ba159acfef6a1dad6fc65129866b to your computer and use it in GitHub Desktop.
Save jsbonso/fe22ba159acfef6a1dad6fc65129866b to your computer and use it in GitHub Desktop.
Transfer data to and from EC2 using SCP
Transfer Data TO EC2
scp -i ~/.ssh/<your pem keyname>.pem <data to transfer> ec2-user@<IP Address>:<desired folder>/<data to transfer>
scp -i ~/.ssh/ec2.pem users.json ec2-user@192.28.25.144:app/users.json
Transfer Data FROM EC2 (Take note that there is a dot (.) on the end)
scp -i ~/.ssh/ec2.pem ec2-user@192.28.25.44:app/users.txt .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment