coder / coder/vscode-coder

Support all accumulating SSH config options instead of re-implementing override behavior

オープン
#695 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
130
フォーク
48
平均マージ
3日 3時間
マージ済み PR(30日)
15

説明

Currently we manually handle SSH config merging, but this requires re-implementing SSH's "first match wins" override behavior ourselves.

## Proposed approach

Instead of manual merging, let the SSH client handle it natively:
- Place `override` configs first in the file (SSH uses "first match wins")
- Keys without values (for non-accumulating options) can be used to remove the entry if we still want to maintain that behavior
- For accumulating options, pass entries as-is from both configs without combining them

This keeps files leaner while avoiding custom override logic.

## Accumulating SSH options to support

These options accumulate across multiple declarations rather than following "first match wins":

| Option | Behavior |
|--------|----------|
| `IdentityFile` | Tried in sequence |
| `CertificateFile` | Tried in sequence |
| `SetEnv` | All values sent to server |
| `SendEnv` | Accumulates (prefix with `-` to clear) |
| `LocalForward` | Multiple tunnels |
| `RemoteForward` | Multiple tunnels |
| `DynamicForward` | Multiple SOCKS proxies |

Additionally, these use space-separated values: `GlobalKnownHostsFile`, `UserKnownHostsFile`, `PermitRemoteOpen`, `CanonicalDomains`.

## Reference

[OpenBSD ssh_config(5)](https://man.openbsd.org/ssh_config.5)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。