LoginSignup
0
0

More than 5 years have passed since last update.

【Mac】Localのファイルをリモートホストへ転送する方法

Posted at

やりたいこと

タイトルのことを、踏み台サーバを経由して行う。

解決策

terminal
$ scp -i ~/.ssh/秘密鍵ファイル ~/Desktop/update.sql user@host:
  • scp
    • ファイルを転送する。
    • 通信はsshで暗号化される
    • Unix系のコマンド
    • 順番
      • scp [option] [コピー元ファイル(path)] [コピー先path]
  • iオプション
    • scpコマンドにおけるオプション
    • 秘密鍵の読み込み

~/.sshにある、秘密鍵をサーバ側の公開鍵と合わせないといけないので、permision deniedが出るときはここを確認する。

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