envd
envd copied to clipboard
feat(CLI): Support SSH(attach) command
Description
midi ssh
Is it done though sshd?
This issue is to support a new command envd ssh to attach into the env.
This issue is to support a new command
envd sshto attach into the env.
What's the main difference between ssh <envd-container> and envd ssh <envd-container>? Any feature we should support through this new command?
envd ssh or envd attach does not require the target if it is run in the build context dir.
For envd-server runner:
envd ssh will be introduced as the new command. It creates the ssh client config, then connect to the ssh proxy server containerssh. The username should be the contains the identitytoken and project name.
The envd-server should:
- Get the identity token and the project name, then find the correct pod to attach.
- Update
containersshapp config with the/v1/configendpoint.
After thinking, I propose not to add the command now.
We already inject the ssh entry in envd-server runner like this:
# entry generated by envd
Host a332139d39b89a241400013700e665a3.envd
PubkeyAcceptedKeyTypes +ssh-rsa
HostKeyAlgorithms +ssh-rsa
HostName 127.0.0.1
Port 2222
UserKnownHostsFile /dev/null
IdentityFile "/home/gaocegege/.config/envd/id_rsa_envd"
StrictHostKeyChecking no
User a332139d39b89a241400013700e665a3
User can use ssh a332139d39b89a241400013700e665a3.envd to attach. Thus there is no need to introduce a new command.
Mainly to support automatic port forwarding other than pure SSH connection. This is also related to the syncthing support