> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/commander-cli/command-reference/connection-commands/ssh-agent.md).

# SSHエージェント

{% hint style="info" %}
特権セッションやセッション記録などの高度な機能を、ゼロトラストのクラウド接続で利用する場合は、[KeeperPAM](/keeperpam/jp/readme.md)の利用が適しています。

コマンダーで説明しているSSHエージェントは、クラウドを介さず、対象サーバーへ直接接続するSSH方式です。KeeperPAMには、Keeper Desktopアプリケーション内の[SSHエージェント](/keeperpam/jp/privileged-access-manager/ssh-agent.md)が含まれます。
{% endhint %}

## SSHエージェント

`ssh-agent` コマンドは、ボルト内のすべてのSSH鍵を読み込み、SSHエージェントサービスを開始するために使用されます。KeeperコマンダーのSSHエージェントを使用すると、ローカルファイルシステムに鍵を保存せずにSSH接続を直接確立でき、任意の標準ターミナルからも利用できます。

SSHエージェントサービスは、以下のような基準に基づいてKeeperボルト内のすべてのレコードがスキャンされます。

* 秘密鍵とオプションのパスワード/パスフレーズを含む「SSH Key」または「Server」のレコードタイプ
* 単一のSSH鍵ファイルが添付されたレコード

### ssh-agentコマンド

**コマンド:** `ssh-agent`

**詳細:** ボルトの鍵を使用して、ローカルコンピュータ上でSSHエージェントプロセスが開始されます。

**オプション:**

* `start`: SSHエージェントサービスの開始と、すべての鍵の読み込み
* `stop`: SSHエージェントサービスの停止
* `info`: SSHエージェントステータスの表示
* `log`: 接続ログ履歴の表示

### 例

コマンダーCLIからSSHエージェントサービスを開始

```
ssh-agent start
```

シェルを使用せずにSSHエージェントを直接開始

```
keeper ssh-agent start
```

{% hint style="info" %}
ターミナルまたは接続ツールからSSHエージェントを使用するには、ターミナルまたはスタートアップファイルで環境変数 `SSH_AUTH_SOCK` を設定する必要があります。例:

**export** **SSH\_AUTH\_SOCK=\~/.keeper/me\@demo.com.ssh\_agent**

設定後、ターミナルからSSHコマンドを実行します。

$ ssh \<host>
{% endhint %}

SSHエージェントサービスの停止

```
ssh-agent stop
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/commander-cli/command-reference/connection-commands/ssh-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
