Title: Automatically update coder SSH config on `coder create` and `coder delete` · Issue #2153 · coder/coder · GitHub
Open Graph Title: Automatically update coder SSH config on `coder create` and `coder delete` · Issue #2153 · coder/coder
X Title: Automatically update coder SSH config on `coder create` and `coder delete` · Issue #2153 · coder/coder
Description: Feature request It would be nice if we could automatically update coder SSH config on coder create and coder delete. With #1900 merged, the coder SSH config is now a separate file we can safely edit without causing trouble for the user (...
Open Graph Description: Feature request It would be nice if we could automatically update coder SSH config on coder create and coder delete. With #1900 merged, the coder SSH config is now a separate file we can safely edi...
X Description: Feature request It would be nice if we could automatically update coder SSH config on coder create and coder delete. With #1900 merged, the coder SSH config is now a separate file we can safely edi...
Opengraph URL: https://github.com/coder/coder/issues/2153
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Automatically update coder SSH config on `coder create` and `coder delete`","articleBody":"## Feature request\r\n\r\nIt would be nice if we could automatically update coder SSH config on `coder create` and `coder delete`.\r\n\r\nWith https://github.com/coder/coder/pull/1900 merged, the coder SSH config is now a separate file we can safely edit without causing trouble for the user (`~/.ssh/coder`).\r\n\r\n### Why is this useful?\r\n\r\n- It removes an extra step, the user only needs to run `coder config-ssh` once\r\n- After `coder create` the workspace automatically will show up in e.g. vscode remote explorer\r\n\r\n### Potential problems\r\n\r\n- Simultaneous writes to `~/.ssh/coder` from multiple coder instances (rare edge case)\r\n\r\nTo 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.\r\n\r\n### Can we do this by _only_ using glob-hosts in `~/.ssh/coder`?\r\n\r\nNo.\r\n\r\nUsing a glob host in `~/.ssh/coder` would allow for `ssh coder.workspace` to work without any additional updates to the config:\r\n\r\n```\r\nHost coder.*\r\n\t...\r\n```\r\n\r\nHowever, 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.\r\n\r\nThere's also a small risk of matching valid domain names, like `ssh coder.[TLD]` where TLD is a valid top-level domain like `.work`, `.edu`, `.jobs`, etc.","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2022-06-08T08:58:28Z","url":"https://github.com/coder/coder/issues/2153"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:12901ecc-8ba0-0e7e-ed57-349cd0e1d792 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B230:29FFA9:23FDC6C:2D93071:6B0180A1 |
| html-safe-nonce | c5716fd2f6284043e630a40e5b54536308f9699265686b66b4839efdb4f0ad2d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjMwOjI5RkZBOToyM0ZEQzZDOjJEOTMwNzE6NkIwMTgwQTEiLCJ2aXNpdG9yX2lkIjoiNjUwNjk0MjU3MjY4OTE5NTE2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bd1160eb4af39c84eae12b9a586c8dd4fb918aa1fa444ceef2e150c20a567790 |
| hovercard-subject-tag | issue:1264421215 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/2153/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7aa7c0c2e3455da86e27545e51de3757d80d894f978489df7021659c517bdf7d/coder/coder/issues/2153 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7aa7c0c2e3455da86e27545e51de3757d80d894f978489df7021659c517bdf7d/coder/coder/issues/2153 |
| og:image:alt | Feature request It would be nice if we could automatically update coder SSH config on coder create and coder delete. With #1900 merged, the coder SSH config is now a separate file we can safely edi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mafredri |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width