-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Is there an existing issue for this bug?
- I have searched the existing issues
Required Troubleshooting Steps
- I have followed these troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting
Connect Locally
It connects successfully
Bug Description
Hi Team,
After the most recent VSCode update on 06/18/2024, whenever I add a new host using RemoteSSH, the extension addes the new host but also heavily changes the configuration file which disrupts any future connections to all servers in the configuration file. Here is the current VSCode version where this issue occurs:
Version: 1.90.2 (user setup)
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:34:26.404Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631
Kindly note that the earlier VSCode version didn't have this issue. However, I found this old issue: #6197 with similar problem.
Current Behavior
Let's assume that I have tihs configuration file:
Host TMP-3PLogs
HostName YYYY
IdentityFile ~/.ssh/id_rsa
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ProxyCommand ssh -i ~/.ssh/id_rsa -W %h:%p -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null XXX@ZZZ
User XXXNow, let's add a new host using the following command in the Remote SSH + button, which basically adds the same host aleady in the configuration file (aka TMP-3PLogs).
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -i ~/.ssh/id_rsa -W %h:%p -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null XXX@ZZZ" XXX@YYYYNow, the configuration file changs to the following:
# the new host is added perfectly
Host ZZZ
HostName YYYY
IdentityFile ~/.ssh/id_rsa
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ProxyCommand ssh -i ~/.ssh/id_rsa -W %h:%p -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null XXX@ZZZ
User XXX
# the old configuratoin changed (see comments below)
Host TMP-3PLogs
HostName YYYY
IdentityFile ~/.ssh/id_rsa
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null # <--- `=` has been added
ProxyCommand ssh -i ~/.ssh/id_rsa -W %h:%p -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null XXX@ZZZ # <-- all `=` have been removed
User XXXThis nasty bug wasted two days of my life I'm not getting back 😞