Skip to content

Older SSH client versions don't connect with VSCode/coder #73

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
groucho64738 opened this issue Mar 29, 2023 · 13 comments
Closed

Older SSH client versions don't connect with VSCode/coder #73

groucho64738 opened this issue Mar 29, 2023 · 13 comments

Comments

@groucho64738
Copy link

Hi. I was testing out connecting to coder sessions through VSCode Desktop on Linux and just wanted to make an observation. On an Ubuntu 20.04 system, I was able to get my connection working. On a RedHat 7 system, SSH doesn't like the 'SetEnv' option.

On Ubuntu, the default ssh client is: OpenSSH_8.2p1
On RH7, it's OpenSSH_7.4p1

Any chance that this can be supported in older SSH clients? If not, maybe a warning in the readme about supported versions would be good.

@kylecarbs
Copy link
Member

We have a fix coming up for this! cc @Emyrk

@groucho64738
Copy link
Author

Thanks.

@kylecarbs
Copy link
Member

You'll be able to override environment variable options inside of Coder now. cc @Emyrk

@plytro
Copy link

plytro commented Apr 7, 2023

You'll be able to override environment variable options inside of Coder now. cc @Emyrk

I'm confused by this statement. Is the intent to make this line be configurable/optional?

When I installed the vscode extension and manually removed that bit from the local minified js file, the extension worked as expected. When that line is injected into the ~/.ssh/config file on RH7, the whole ssh config file is invalid and ssh to any machine stopped working for me.

@kylecarbs
Copy link
Member

@plytro yup! These can be configured via the Coder deployment:

image

If you override that var to empty, it should be removed.

@kylecarbs
Copy link
Member

Keep in mind connection tracking will break, so the number of active VS Code sessions detected by Coder won't be accurate, but that should be fine in some cases.

@plytro
Copy link

plytro commented Apr 7, 2023

Can the docs be clarified? I initially read those docs as you must provide all the ssh config options. I had to read the code to see that it was merged with the defaults and then read a bit more to understand I need to pass in an empty string to remove a key.

@kylecarbs
Copy link
Member

I was just thinking about this, and we should just not use SetEnv if the SSH client doesn't support it. I'll make this change!

@plytro
Copy link

plytro commented Apr 10, 2023

Any idea when this change may become available or should we use the version that allows us to set this server side.

@kylecarbs
Copy link
Member

I looked into parsing the version string a bit which we can do, but we'd need to look into the SSH experience cross-platform a bit more to ensure that's reliable. Could you do ssh -V for me and paste the output on your RHEL machine?

Feel free to use the var that sets server-side, that works too!

@Emyrk
Copy link
Member

Emyrk commented Apr 12, 2023

You can also add/remove ssh options on the extension itself: #74

@plytro
Copy link

plytro commented Apr 13, 2023

The client side setting works for me as a user, however if we have dozens (I'd hope they're not all on such an old version of ssh) we'd ideally like everyone to just install the plugin and with minimal config on their end. The server side setting worked great for us.

$ ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

@kylecarbs
Copy link
Member

Fixed in the attached PR @plytro. New version coming out shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants