Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Automatically update coder SSH config oncoder create andcoder delete #2153

Closed as not planned
Labels
apiArea: HTTP APIcliArea: CLIsiteArea: frontend dashboard
@mafredri

Description

@mafredri

Feature request

It would be nice if we could automatically update coder SSH config oncoder create andcoder delete.

With#1900 merged, the coder SSH config is now a separate file we can safely edit without causing trouble for the user (~/.ssh/coder).

Why is this useful?

  • It removes an extra step, the user only needs to runcoder config-ssh once
  • Aftercoder create the workspace automatically will show up in e.g. vscode remote explorer

Potential problems

  • Simultaneous writes to~/.ssh/coder from multiple coder instances (rare edge case)

To work around the simultaneous write, we can grab a flock on the file, fetch the most recent workspaces, write, release flock. This will work as a kind of mutex ensuring each separate process only writes the latest workspaces to the file.

Can we do this byonly using glob-hosts in~/.ssh/coder?

No.

Using a glob host in~/.ssh/coder would allow forssh coder.workspace to work without any additional updates to the config:

Host coder.*...

However, this does not allow tools like VSCode Remote Explorer to detect the hostnames/workspaces, nor does it work for shell autocomplete. So even if we use globs or not, we will want to write the actual workspaces to the config.

There's also a small risk of matching valid domain names, likessh coder.[TLD] where TLD is a valid top-level domain like.work,.edu,.jobs, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIcliArea: CLIsiteArea: frontend dashboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp