0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【SCP】ローカルからリモートマシンへのコピー

Posted at

もう忘れたのはn回目なので備忘録として残しておく

最高にわかりやすいのはこちら→scpコマンド チートシート
感謝です

私の環境でよくあるのが、クラウドサーバー(AWS, OracleCloud)で建てているインスタンスへディレクトリごとコピーすること。

$ scp -i ~/.ssh/hoge.pem -r ~/Desktop/hoge username@xxx.xxx.xxx.xxx:~/

-iで鍵を指定。-rでディレクトリを指定
今回はデスクトップのhogeというフォルダごと
username@xxx.xxx.xxx.xxxはsshと同じ
最後の:~/の部分でどこにコピーするか決めている
今回はホームディレクトリ

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?