search
LoginSignup
22
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

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

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

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
What you can do with signing up
22
Help us understand the problem. What are the problem?