Skip to content

Update supported SSH locations for VS Code Desktop #11467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
loujaybee opened this issue Jul 19, 2022 · 8 comments · Fixed by gitpod-io/gitpod-vscode-desktop#11
Closed

Update supported SSH locations for VS Code Desktop #11467

loujaybee opened this issue Jul 19, 2022 · 8 comments · Fixed by gitpod-io/gitpod-vscode-desktop#11

Comments

@loujaybee
Copy link
Member

loujaybee commented Jul 19, 2022

Currently the following file dictates the locations where SSH keys are found for VS Code Desktop connections.

This issue is to investigate removing this so it's not as brittle or explicit about locations, and will support behaviours such as modifying the SSH key location, and where possible to directly follow the rules of SSH client native to the OS.

This also means that the detection for SSH connection might suggest the user doesn't have a key when they actually do, so we might also want to support "continue" anyway" in the SSH connection dialog on VS Code Desktop.

Also, consider the user changing the SSH file location from within VS Code itself.

image

@akosyakov
Copy link
Member

We discussed with @jeanp413:

  • to add analytic event for this dialog to learn how often it happens and what users are doing, it should have connection metadata that we can correlate with connecting event
  • using native SSH client seem to be tricky, so instead we will parse SSH config file and respect Remote SSH setting to find such file

@Pothulapati
Copy link
Contributor

I'm using the new 1password for SSH integration, which means theres a new 1password SSH agent installed locally that takes care of Authentication (by retrieving private keys from the account).

But, I still get the prompt to copy password, even though it isn't needed as I authenticate with my MacOS touch ID (for 1password to work). Made a video for the same at https://www.loom.com/share/4817abee8e9f4147949c4636b9d93b2b

Not sure about the specific tech details. My reasoning was, I don’t have a private key file as that’s the whole point of using 1password but the prompt is searching for a file, and showing it as I don’t have it.

@akosyakov
Copy link
Member

@jeanp413 I'm not sure anymore that trying to parse on our side is great idea. It won't cover @Pothulapati use case.

Could we consider instead asking a user about it? i.e.

  • if a user does not have SSH keys in a Gitpod account we show a prompt to use a password and configure SSH keys
  • if a user has then ask a user whether he would like to use SSH keys on this machine or password, if he selects a key then remember this choice and consider that machine is configured properly, so we won't ask again. We can make it also explicit, i.e options Use SSH Key and Always use SSH Key, only seconds will suppress the prompt in the future.

I think it simplifies implementation and let a user to streamline the flow without false positive.

@Pothulapati
Copy link
Contributor

Pothulapati commented Jul 29, 2022

Using an SSH-agent for retrevial with no local private key files may not be as common (yet?). So, I don't think my case should be the main focus here. But it would be nice to have a way to disable the pop up for users who know what they are doing. 👍🏼

@jeanp413
Copy link
Member

I already had code for it before by reading the ssh agent, but commented and deleted it because it seem too much at the moment 🤦 will add it again, that will cover all the remaining cases

@akosyakov
Copy link
Member

@jeanp413 please check with @Pothulapati to prove that it covers all cases 🙏

@jeanp413
Copy link
Member

jeanp413 commented Aug 4, 2022

@Pothulapati I released a new pre-release version of the extension 0.1.2022080404, now the extension should detect keys from the ssh-agent, could you test it and let me know if it works for you

@Pothulapati
Copy link
Contributor

@jeanp413 Yep, I tested this today with v0.1.2022080517 and it doesn't show me the prompt to copy the password anymore! Thanks!👍🏼

@akosyakov akosyakov moved this from Scheduled to Done in 🚀 IDE Team Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants