Skip to content

Instantly share code, notes, and snippets.

@3panda
Last active February 6, 2018 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3panda/fc97086349fb5678ba9e1ccbbc0bd483 to your computer and use it in GitHub Desktop.
Save 3panda/fc97086349fb5678ba9e1ccbbc0bd483 to your computer and use it in GitHub Desktop.
EC2とローカルでのファイルのやりとり

アップロード

# scp -i {xxx.pemまでのPath} {対象ファイルのPath} ec2-user@xx.xxx.xxx.xxx:{アップロード先}
# 例)
scp -i xxx.pem ~/test/test002.txt ec2-user@xx.xxx.xxx.xxx:test:test

ダウンロード

# scp -i scp -i scp -i {xxx.pemまでのPath}  ec2-user@xx.xxx.xxx.xxx:{対象ファイルのPath} {ダウンロード先}
# 例)
scp -i scp -i xxx.pem ec2-user@xx.xxx.xxx.xxx:test/test.py ~/test/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment