Show Table of Contents
12.3.3. sftp ユーティリティの使用
sftp ユーティリティを使用すると、セキュアでインタラクティブな FTP セッションを開始することができます。設計に関しては、暗号化されたセキュアな接続を使用する以外は ftp と似ています。
リモートシステムに接続するには、以下の形式でコマンドを使用します:
sftp username@hostname
例えば
penguin.example.com という名前のリモートマシンに john というユーザー名でログインするには、以下のように入力します:
~]$ sftp john@penguin.example.com
john@penguin.example.com's password:
Connected to penguin.example.com.
sftp>
正しいパスワードを入力すると、プロンプトが表示されます。
sftp ユーティリティは、ftp で使用されるコマンドセットと似たものを使用します (表12.3「利用可能な sftp コマンドの抜粋」 を参照)。
表12.3 利用可能な sftp コマンドの抜粋
| コマンド | 詳細 |
|---|---|
ls [directory] | リモート directory の内容を一覧表示します。何も指定されていない場合は、デフォルトで現在の作業ディレクトリが使用されます。 |
cd directory | リモートの作業ディレクトリを directory に変更します。 |
mkdir directory | リモートの directory を作成します。 |
rmdir path | リモートの directory を削除します。 |
put localfile [remotefile] | localfile をリモートマシンに転送します。 |
get remotefile [localfile] | remotefile をリモートマシンから転送します。 |
利用可能なコマンドの全一覧は、sftp(1) の man ページを参照してください。

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.