coder / coder/vscode-coder

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

Abierto
#695 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
130
Forks
48
Merge medio
3 d 3 h
PR fusionados (30 d)
15

Descripción

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)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.