Closed cutecutecat closed 1 year ago
Won't fix due to:
A --> B --> C
A: local machine, with VSCode editor
installed
B: remote server, with envd
, VSCode server
and vscode-envd
extension installed
C: environment constructed by envd
SSH key of C
is at B
SSH key of B
is at A
B
to A
:VSCode SSH-Remote installed extension cannot access local machine file system, so it's impossible to download key or revise ./ssh/config
.
ref: https://github.com/microsoft/vscode-remote-release/issues/7182
B
and use B
as a proxy:OpenSSH don't have a implement. We need to maintain a command that may fail at any time.
ref: https://serverfault.com/questions/337274/ssh-from-a-through-b-to-c-using-private-key-on-b
Two options to access container at remote:
Basically I don't think we need the key of B. And vscode can do remote SSH + attach to the container at the remote. But I don't know how it is done
Two options to access container at remote:
- Port forward remote container port 2222 to local. The port-forward part is handled by user. We only need to get the key of the envd container
- Use JumpHost of ssh, you add a JumpHost entry in local ssh config, which is for the remote machine.
Basically I don't think we need the key of B. And vscode can do remote SSH + attach to the container at the remote. But I don't know how it is done
Though Dev containers installed locally, it actually runs at remote when SSH is connected. It is not same with most extensions, and could get around VSCode Local/Remote contrictions. So I think we could introduce Dev containers
as a workaround to connect when we checked extension running at a remote.
When a user want to attach a remote SSH when
envd
is instaleed remote and VSCode is installed local, he will find he has no secret key at local to access remote environment.We will provide a command:
Envd: sync SSH secret key from remote
to download remote secret key and rewrite local SSH configAnd these fix to enable remote access: