Skip to content

Non-recent versions of JetBrains editors don't support Include statements in SSH config #2317

Closed
@mafredri

Description

@mafredri

JetBrains only added support for SSH config parsing via ssh -G this year (https://youtrack.jetbrains.com/issue/IDEA-221941/Get-rid-of-sshconfig-parser-use-ssh-G-instead). Before that they used a custom config parser that does not support Include coder, which we're currently using (#1326, #1900).

JetBrains has (or plans to) make OpenSSH config parsing the default, but recent versions (e.g. 2022.1.3`) require this parser to be manually enabled in Advanced settings.

As a result, it's not possible to connect to coder workspaces unless the new parser is enabled, or manual changes are made to ~/.ssh/config.

Our options are (there may be more, ideas welcome):

  1. Document the JetBrains gotcha, instruct the user how to change the parser (or update their SSH config for older versions (e.g. see Host coder.* below))
  2. Revert the changes in feat: Refactor CLI config-ssh to improve UX #1900 either fully or partially (there are some other good changes like safer config writing and --diff in that PR)
  3. Add an option like coder config-ssh --jetbrains-compat (or --single-file) which writes to ~/.ssh/config
  4. Something else?

Example for how to define a catch-all that could be used as part of docs (or second option):

Host coder.*
	ConnectTimeout=0
	StrictHostKeyChecking=no
	UserKnownHostsFile=/dev/null
	LogLevel ERROR
	ProxyCommand "coder" --global-config "/Users/me/Library/Application Support/coderv2" ssh --stdio $(echo %h | cut -d. -f2-)

Also note that only having the glob (Host coder.*) is incompatible with VSCode Remote SSH (the workspace won't be listed).

This is a blocker for #2153 (if we decide to do it).

Metadata

Metadata

Assignees

Labels

cliArea: CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions