Remote-SSH: Keep being asked for platform
Using the steps from https://github.com/microsoft/vscode/issues/226759 (with the custom port) I'm asked for the remote platform every time I connect.
Remote-SSH v0.114.2024083019 on Windows.
There is an entry for localhost in the user settings:
"remote.SSH.remotePlatform": {
"win11-server2": "windows",
"localhost": "linux"
},
I am on vscode Insiders (on Windows), connecting strictly to a small number of Linux hosts.
I noticed a while ago that remote.SSH.serverInstallPath started being ignored and the remote server was installed in $HOME, but didn't pay too much attention.
Recently, remote.SSH.remotePlatform started being ignored too, so I'm also asked about the remote platform every time.
It looks like this only affected the current profile, switching to the default profile (which I normally never use) works around the issue.
So, I used the new vscode profile editor -> my broken profile -> contents -> settings -> open JSON -> sure enough, both remote.SSH.remotePlatform and remote.SSH.serverInstallPath used very old values that did not reflect any recent changes I made.
I think there is some confusion (either in the extension or in the vscode profile handling) when it comes to which profile JSON is updated when the settings are edited using the settings editor or used when the connection is initialized.
Another interesting behavior related to this that I observed:
- edit the
remote.SSH.remotePlatformvia settings editor for the current profile, e.g. I had 3-4 hosts, replaced those with a single*entry; - connect to the host (I'm asked for the platform, of course);
- the setting editor now shows both the new
*wildcard entry and some stale entries (matching those 3-4 hosts) - it might have took those from the default / another profile I have;
I know this is not very well documented and your mileage might vary trying to reproduce this, but if someone else runs into this problem, at least there's a workaround editing the broken profile JSON...
Edit: This might be a vscode profile issue:
- use a non-default profile;
- open settings (
ctrl + ,) and change one of the less likely to have been modified settings, e.g.remote.SSH.localServerDownload; - from the profile editor, open the settings JSON for the currently active profile, look for the setting; expected to be there, but it's not;
- from the profile editor, open the settings JSON for the default profile, look for the setting, it's probably there...
@alexandruavadanii There was indeed an issue involving the non-default profile that was resolved in recent VS Code updates. If you can still reproduce, please do let us know :)
Hi, Haven't run into this again, but since I haven't changed the profiles, my experience is probably inconclusive.
This now works for me too. Good to close for my case.