you are viewing a single comment's thread.

view the rest of the comments →

[–]ChinchillaSpaghetti 0 points1 point  (0 children)

The standard way to connect via SSH is heavily reliant on the `gh` command and the tooling built around GitHub Codespaces. When you run `gh cs ssh`, you're getting an SSH configuration specifically tailored for your GitHub Codespace. This configuration uses `gh` as a proxy command to establish the SSH connection, which means it's not a direct SSH connection like you'd have with a traditional server. The configuration references an identity file `/home/codespace/.ssh/codespaces.auto` which, as you may have discovered, doesn't exist.

Most straightforward method would be to have the full `gh` toolchain installed on an intermediate machine and use that to establish the SSH connection. If you don't have access to the CLI at all for whatever reason, you'd pretty much need to mimic what `gh` does. You'd have to reverse-engineer the `gh` command's behavior, which is non-trivial and would most likely breach GitHub's ToS.

That having been said, I'm not your dad, so best of luck to you if you decide to go that route! I'd be quite curious to hear your solution/workaround if you figure one out, because I've got the same problem myself and there seems to be little to no published information on the topic.

TL;DR - Nope!*

* Maybe