scp(Secure Copyの方)

Secure(確保)」「Contain(収容)」「Protect(保護)」のほうではないです。

scp -h でわかることしか書いていないです

「scp」コマンドの使用は非推奨らしいです

scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
            [-J destination] [-l limit] [-o ssh_option] [-P port]
            [-S program] source ... target

使い方

scp コピー元 コピー先

cpと変わらない

リモートパスの入れ方

user@remoteHost:/root/test.txt

ローカルパスの入れ方

.\Desktop\test.txt
.\Desktop\log\
/home/user/test.txt
...などなど

オプション

  • -C・・・通信を暗号化する、通信を圧縮します。
  • -i 秘密鍵ファイル・・・RSAまたはDSA認証の秘密鍵を指定する(~/.ssh/id_rsa)
  • -P・・・ポート番号を指定する
  • -p・・・パーミッションを保持した状態でコピーする
  • -r・・・ディレクトリ内を再帰的にコピーする(ディレクトリごとコピー)
  • ーv・・・情報を表示する(なんか色々出てくる)
  • さいごに

    「scp」コマンドの使用は非推奨らしいです

    ← Go home