When you use Visual Studio Code's Remote - SSH extension, it installs a component called vscode-server on the remote machine to facilitate the connection and interaction between your local VS Code instance and the remote server.
By default, whenever you update your local VS Code, it also tries to update vscode-server on the remote server. However, there are some ways to manage or control this behavior if you want to keep the existing vscode-server version on the remote server intact:
Options to Update VS Code without Changing vscode-server
-
Control the Update Manually:
- When you connect to the remote server using Remote - SSH and it prompts to update
vscode-server, you can decline the update. To do this, you can simply close the prompt or cancel the update dialog when it appears.
-
Use --no-update Option:
-
Pre-existing Server:
- If you do not want VS Code to upgrade the
vscode-server, ensure the same version of the vscode-server is already installed and operational on the remote server that is compatible with your local VS Code version. In this case, VS Code may not prompt for an update.
-
Manual Installation/Management:
- You can manually manage the
vscode-server installation on the remote server. Download and install the specific version of vscode-server you wish to use. Then, you can point your local VS Code to use it by setting the environment variable VSCODE_SERVER_PATH or the appropriate configuration in your settings to avoid automatic updates.
Important Considerations
- Compatibility: Make sure that the version of
vscode-server on the remote server is compatible with the version of Visual Studio Code you are using locally, as mismatched versions can lead to connectivity issues.
- Functionality: Keeping an older version of
vscode-server may prevent you from accessing newer features or improvements that are available in newer versions.
By remaining aware of these settings and management options, you can effectively prevent Visual Studio Code from automatically updating vscode-server on a remote SSH server while still being able to update your local instance of VS Code.