> 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-sdk/keeper-commander-sdks/sdk-command-reference/keeperpam-commands/pam-connection-commands.md).

# PAM Connectionコマンド

PAMマシンおよびPAMデータベースのレコードに紐づく接続パラメーターとユーザーアカウントの編集コマンド。run-batchコマンドを使えば一括処理も可能

### Connection Editコマンド <a href="#connection-edit-command" id="connection-edit-command"></a>

PAMリソースレコード (`pamMachine`、`pamDatabase`、`pamDirectory`など) またはPAM構成レコードの接続設定を編集します。プロトコル、ポートの上書き、スクロールバック、管理者/起動用の認証情報など、ボルトのフィールドを更新します。

<details>

<summary>DotNet CLI</summary>

**コマンド**: `pam-connection edit`

**別名**: `pam-conn edit` / `pam-conn e`

**パラメーター**:

<table data-search="false"><thead><tr><th width="268">パラメーター</th><th>説明</th></tr></thead><tbody><tr><td><code>&#x3C;record></code> (positional)</td><td>PAMリソースまたはPAM構成のUID/タイトル</td></tr><tr><td><code>--configuration</code>, <code>-c</code></td><td>PAM構成のUIDまたはタイトル (リソースが未リンクの場合は必須)</td></tr><tr><td><code>--admin-user</code>, <code>-a</code></td><td>リソースの管理者認証情報として使用するPAMユーザーのUID/タイトル</td></tr><tr><td><code>--launch-user</code></td><td>起動用認証情報として使用するPAMユーザーのUID/タイトル</td></tr><tr><td><code>--clear-launch-user</code></td><td>リソースから起動用認証情報を削除 (<code>pamMachine</code> / <code>pamDatabase</code> / <code>pamDirectory</code>のみ)</td></tr><tr><td><code>--protocol</code>, <code>-p</code></td><td>接続プロトコル (例: <code>ssh</code>、<code>rdp</code>、<code>mysql</code>、<code>postgresql</code>、<code>sql-server</code>、<code>telnet</code>、<code>vnc</code>、<code>http</code>、<code>kubernetes</code>)。空文字列を指定すると解除</td></tr><tr><td><code>--connections</code></td><td>接続の許可設定: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>--connections-recording</code></td><td>セッション録画: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>--typescript-recording</code></td><td>TypeScript形式の録画: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>--connections-override-port</code></td><td>接続に使用するポートの上書き。空文字列を指定すると解除</td></tr><tr><td><code>--key-events</code>, <code>-k</code></td><td>キーイベント (<code>recordingIncludeKeys</code>): <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>--scrollback</code></td><td>ターミナルのスクロールバックサイズ。空文字列を指定すると解除</td></tr><tr><td><code>--rotate-on-termination</code></td><td>セッション終了時に起動用認証情報をローテーション: <code>on</code>または<code>off</code> (<code>pamMachine</code> / <code>pamDatabase</code> / <code>pamDirectory</code>のみ)</td></tr><tr><td><code>--silent</code>, <code>-s</code></td><td>サマリー出力を抑制</td></tr></tbody></table>

**例**:

{% code expandable="true" %}

```csharp
My Vault> pam-connection edit <RESOURCE_UID> --configuration <CONFIG_UID> --connections=on --protocol ssh
My Vault> pam-connection edit <RESOURCE_UID> --admin-user <PAM_USER_UID> --launch-user <PAM_USER_UID>
My Vault> pam-connection edit <RESOURCE_UID> --connections-recording=on --key-events=on
My Vault> pam-connection edit <RESOURCE_UID> --connections-override-port 2222 --scrollback 1000
My Vault> pam-connection edit <RESOURCE_UID> --rotate-on-termination=on
My Vault> pam-connection edit <RESOURCE_UID> --clear-launch-user
My Vault> pam-connection edit <CONFIG_UID> --connections=on
My Vault> pam-conn e <RESOURCE_UID> -c <CONFIG_UID> --connections=on -p ssh
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

```csharp
using KeeperSecurity.Plugins.PAM;

var result = await ConnectionUtils.EditConnectionAsync(vault, new PamConnectionEditOptions
{
    Record = "<RESOURCE_UID>",
    Configuration = "<CONFIG_UID>",
    Connections = "on",
    Protocol = "ssh",
    AdminUser = "<PAM_USER_UID>",
    LaunchUser = "<PAM_USER_UID>",
    ConnectionsRecording = "on",
    TypescriptRecording = "default",
    ConnectionsOverridePort = "2222",
    KeyEvents = "on",
    Scrollback = "1000",
    RotateOnTermination = "on",
    Silent = false
});

foreach (var message in result.Messages)
{
    Console.WriteLine(message);
}

if (result.RecordUpdated || result.GraphUpdated)
{
    Console.WriteLine($"Connection settings updated for {result.RecordUid}");
}
```

</details>

<details>

<summary>Power Commander</summary>

**コマンド**: `Set-KeeperPamConnection`

**別名**: `pam-connection-edit`

**パラメーター**:

<table data-search="false"><thead><tr><th width="268">パラメーター</th><th>説明</th></tr></thead><tbody><tr><td>-Record</td><td>PAMリソースまたはPAM構成のUID/タイトル</td></tr><tr><td><code>-Configuration</code>, <code>-c</code></td><td>PAM構成のUID/タイトル</td></tr><tr><td><code>-AdminUser</code>, <code>-a</code></td><td>管理者認証情報として使用するPAMユーザー</td></tr><tr><td><code>-LaunchUser, -lu</code></td><td>起動用認証情報として使用するPAMユーザーのUID/タイトル</td></tr><tr><td><code>-ClearLaunchUser</code></td><td>起動用認証情報を削除</td></tr><tr><td><code>-Protocol</code>, <code>-p</code></td><td>接続プロトコル (例: <code>ssh</code>、<code>rdp</code>、<code>mysql</code>、<code>postgresql</code>、<code>sql-server</code>、<code>telnet</code>、<code>vnc</code>、<code>http</code>、<code>kubernetes</code>)。空文字列を指定すると解除</td></tr><tr><td><code>-Connections, -cn</code></td><td>接続の許可設定: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>-ConnectionsRecording, -cr</code></td><td>セッション録画: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>-TypescriptRecording, -tr</code></td><td>TypeScript形式の録画: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>-ConnectionsOverridePort, -cop</code></td><td>接続に使用するポートの上書き。空文字列を指定すると解除</td></tr><tr><td><code>-KeyEvents</code>, <code>-k</code></td><td>キーイベント: <code>on</code>、<code>off</code>、<code>default</code></td></tr><tr><td><code>-Scrollback, -sb</code></td><td>ターミナルのスクロールバックサイズ。空文字列を指定すると解除</td></tr><tr><td><code>-RotateOnTermination</code></td><td>セッション終了時に起動用認証情報をローテーション: <code>on</code>または<code>off</code> (<code>pamMachine</code> / <code>pamDatabase</code> / <code>pamDirectory</code>のみ)</td></tr><tr><td><code>-Silent</code>, <code>-s</code></td><td>最終更新行の出力を抑制</td></tr></tbody></table>

**例**:

```powershell
PS > Set-KeeperPamConnection -Record "DkPBB1AuaHpt8JQ-jTLEEw" -Configuration "fTKLyvpZsuabGJiRuut40g" `
  -AdminUser "dy3D5Uky_soUveE3TpMLaQ" -Protocol ssh -Connections on -ConnectionsRecording on -ConnectionsOverridePort 22
Connection settings updated for DkPBB1AuaHpt8JQ-jTLEEw

PS > pam-connection-edit -r "DxtvucKwfKCM9YCH1iuTCg" -c "fTKLyvpZsuabGJiRuut40g" `
  -a "q6bWilZxKHjW5F3LySI2wQ" -lu "iqqtWcC146Te5eCXC-Uztw" -p rdp -cn on -cr on -cop 3389

PS > Set-KeeperPamConnection -Record "DkPBB1AuaHpt8JQ-jTLEEw" -ClearLaunchUser -Silent


```

</details>

<details>

<summary>Python CLI</summary>

**コマンド: 近日公開**

</details>

<details>

<summary>Python SDK</summary>

**コマンド: 近日公開**

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/keeperpam-commands/pam-connection-commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
