# SSHエージェント

## SSHエージェント

`ssh-agent`コマンドで、ボルト内のSSH鍵をすべて読み込み、SSHエージェントサービスを開始します。KeeperコマンダーのSSHエージェントを使用して直接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 <ホスト>
{% endhint %}

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

```
ssh-agent stop
```


---

# Agent Instructions: 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.
