Show Table of Contents
12.3.2. scp ユーティリティの使用
scp を使用すると、暗号化されたセキュアな接続でマシン間のファイル転送を行うことができます。設計に関しては、rcp と非常に似ています。
ローカルファイルをリモートシステムへ転送するには、以下の形式でコマンドを使用します:
scp localfile username@hostname:remotefile
例えば、
taglist.vim を penguin.example.com という名前のリモートマシンに転送したい場合は、シェルプロンプトで以下のように入力します:
~]$ scp taglist.vim john@penguin.example.com:.vim/plugin/taglist.vim
john@penguin.example.com's password:
taglist.vim 100% 144KB 144.5KB/s 00:00
一度に複数のファイルを指定することも可能です。
.vim/plugin/ の内容を penguin.example.com のリモートマシン上の同じディレクトリに転送するには、以下のコマンドを入力します:
~]$ scp .vim/plugin/* john@penguin.example.com:.vim/plugin/
john@penguin.example.com's password:
closetag.vim 100% 13KB 12.6KB/s 00:00
snippetsEmu.vim 100% 33KB 33.1KB/s 00:00
taglist.vim 100% 144KB 144.5KB/s 00:00
リモートファイルをローカルシステムへ転送するには、以下の構文を使用します:
scp username@hostname:remotefile localfile
例えば
.vimrc 設定ファイルをリモートマシンからダウンロードするには、以下のように入力します:
~]$ scp john@penguin.example.com:.vimrc .vimrc
john@penguin.example.com's password:
.vimrc 100% 2233 2.2KB/s 00:00
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.