LoginSignup
21
22

More than 5 years have passed since last update.

ローカルからAWSのEC2にファイルをコピー

Posted at

scpコマンドはファイルやフォルダをSSHで暗号化しながら転送してくれるコマンド。

$ cd ./.ssh/keys
$ scp -i [秘密鍵] [転送するファイルのパス] [EC2ユーザー名]@[パブリックDNS]:[コピー先のパス]

(例)

$ cd ./.ssh/keys
$ scp -i expample.pem test.php [EC2ユーザー名]@[パブリックDNS]:~/

(参考)
http://kawatama.net/web/1298

21
22
0

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
21
22