LoginSignup
14
16

More than 3 years have passed since last update.

SCPコマンドでEC2へファイルのアップロード&ダウンロード

Last updated at Posted at 2017-07-25

サーバーからダウンロード

ファイルをダウンロード

$ scp -i ~/.ssh/{***.pem} ec2-user@{IPアドレスorドメイン}:/tmp/{file_path} .

ディレクトリをダウンロードする場合、-rをつける

$ scp -i ~/.ssh/{***.pem} -r ec2-user@{IPアドレスorドメイン}:/tmp/ .

サーバーへアップロード

ファイルをアップロード

$ scp -i -r ~/.ssh/{***.pem} files/ ec2-user@{IPアドレスorドメイン}:/tmp/ .
14
16
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
16