Skip to content

devspace.yaml ssh allow using relative paths for configuring identity (help Windows+WSL users) #3065

@acelinkio

Description

@acelinkio

Is your feature request related to a problem?
Add configuration for using a relative path in the IdentityFile config written into .ssh/config. Currently full paths are written to the config file

Example .ssh/config generated via DevSpace

# DevSpace Start backend.bun-minimal.devspace
Host backend.bun-minimal.devspace
  HostName localhost
  LogLevel error
  Port 10118
  IdentityFile "/home/acelinkio/.devspace/ssh/id_devspace_ecdsa"
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  User devspace
# DevSpace End backend.bun-minimal.devspace

Which solution do you suggest?
Allow a configuration parameter to set the IdentityFile to use a relative path ~/.devspace/ssh/id_devspace_ecdsa

If this used a relative path, I could symlink my .ssh/config file and .devspace directory. Then I could natively use Windows VSCode to remote in.

Which alternative solutions exist?
A lot of ducktape a bunch of glue together. See below.

Additional context
Using Windows+WSL+VSCode+DevSpaces is a bit of a pain.

Windows is running VSCode. VSCode remotes into my WSL instance for a majority of things. Then I am using DevSpaces in WSL to create remote development containers inside of my Kubernetes cluster. DevSpaces can be configured to setup a remote ssh server inside of the pod and saves the credentials locally in wsl. Here is the workaround I have to do to get everything functioning.

  • For ease of use, I symlink my ~/.ssh/config in WSL to Windows host path ~/.ssh/config
  • Set VSCode SSH Extension setting Remote.SSH: Path to the full path to ssh-helper.bat
    ssh-helper.bat content
C:\Windows\system32\wsl.exe ssh %*

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureNew feature or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions