Skip to content
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

Overriddes VSCode config for SSH Config Location #10692

Closed
Merith-TK opened this issue Jun 16, 2022 · 10 comments
Closed

Overriddes VSCode config for SSH Config Location #10692

Merith-TK opened this issue Jun 16, 2022 · 10 comments

Comments

@Merith-TK
Copy link

Bug description

this literally changes the vscode global config for this to work, and it is quite annoying to have to switch it back every single time as I have workspaces on remote hardware that I need to be able to access quickly

Steps to reproduce

have ~/.ssh/config set as your default config locally

then click "open in vscode" on gitpod,

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

It is very annoying and I believe there should be an way to not do this, or rather add an tempory config into the pre-defined .ssh/config that is then deleted after use

@Merith-TK Merith-TK added the type: bug Something isn't working label Jun 16, 2022
@filiptronicek
Copy link
Member

Hey there @Merith-TK, sorry to hear of your troubles.

I believe the extension should not alter your SSH config anymore in the latest version. Could you please check what version you are using and try out the pre-release version if you are not currently using it? It should be as simple as clicking the button on the extension's page in VS Code. It should be released in the stable channel soon.

image

@Merith-TK
Copy link
Author

Merith-TK commented Jun 16, 2022

pre-use of extension
image

After use settings remained the same (yay!)

however, now
image

Relevant Output logs from SSH extension

[15:53:23.007] SSH Resolver called for host: epicpkmn11-dsidl-ng5adbkfgew#KrKgE980Rv-u1aDZIsF3KGyO8GauvAaT@epicpkmn11-dsidl-ng5adbkfgew.ssh.ws-us47.gitpod.io
[15:53:23.007] Setting up SSH remote "epicpkmn11-dsidl-ng5adbkfgew.ssh.ws-us47.gitpod.io"
[15:53:23.014] Using commit id "30d9c6cd9483b2cc586687151bcbcd635f373630" and quality "stable" for server
[15:53:23.020] Install and start server if needed
[15:53:25.580] Checking ssh with "ssh -V"
[15:53:25.623] > OpenSSH_for_Windows_8
[15:53:25.624] > .6p1, LibreSSL 3.4.3

[15:53:25.628] Running script with connection command: ssh -T -D 51367 "epicpkmn11-dsidl-ng5adbkfgew#KrKgE980Rv-u1aDZIsF3KGyO8GauvAaT@epicpkmn11-dsidl-ng5adbkfgew.ssh.ws-us47.gitpod.io" bash
[15:53:25.631] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[15:53:26.534] > Connection to epicpkmn11-dsidl-ng5adbkfgew.ssh.ws-us47.gitpod.io closed by remote host.
> The process tried to write to a nonexistent pipe.
> �]0;C:\WINDOWS\System32\cmd.exe�
[15:53:26.534] Got some output, clearing connection timeout
[15:53:27.823] "install" terminal command done
[15:53:27.824] Install terminal quit with output: �]0;C:\WINDOWS\System32\cmd.exe�
[15:53:27.824] Received install output: �]0;C:\WINDOWS\System32\cmd.exe�
[15:53:27.825] Failed to parse remote port from server output
[15:53:27.826] Resolver error: Error: 
	at Function.Create (c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:585219)
	at Object.t.handleInstallOutput (c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:583871)
	at Object.t.tryInstall (c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:680958)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:643905
	at async Object.t.withShowDetailsEvent (c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:647221)
	at async Object.t.resolve (c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:644955)
	at async c:\Users\zachd\.vscode\extensions\ms-vscode-remote.remote-ssh-0.82.1\out\extension.js:1:727005
[15:53:27.830] ------

@filiptronicek
Copy link
Member

@jeanp413 have we seen this issue yet with SSH Gateway?

@jeanp413
Copy link
Member

@Merith-TK could you try using an absolute path to your default ssh config file in the Remote.SSH config file setting like this C:\Users\{USERNAME}\.ssh\config? If that doesn't work maybe try deleting known_hosts file. (from stackoverflow)

@MilesCranmer
Copy link

I am also seeing this issue as of today on my machine which is macOS Monterey. Even when I remove the gitpod-provided ssh config manually from settings, it just adds it back the next time I launch gitpod, which prevents me from using my local ssh config in other windows.

@MilesCranmer
Copy link

@filiptronicek @jeanp413 maybe a simple fix would be to append the gitpod ssh configuration to ~/.ssh/config, rather than replace it with a different file? I do wonder if there is a cleaner solution.

@axonasif
Copy link
Member

I disabled gitpod.remote.useLocalApp and that does not seem to overwrite my VSCODE remote.SSH.configFile.

@jeanp413
Copy link
Member

jeanp413 commented Jun 24, 2022

@MilesCranmer you can try "gitpod.remote.useLocalApp": false in your settings.json or install the pre-release version of the gitpod-desktop extension (it's false by default in there). With that change it won't override your .ssh.config file

@akosyakov
Copy link
Member

I'm closing it, please follow #10692 (comment). In the future it is going to become a default.

@loujaybee
Copy link
Member

Also, please see: https://www.gitpod.io/blog/vscode-desktop-ssh-updates

For more information.

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

No branches or pull requests

7 participants