Install a VS Code Extension on an SSH Remote Only
When you open a remote connection in VS Code (SSH), extensions can be installed either locally or on the remote. Sometimes you only want an extension on the remote — for example, a language server that only makes sense in that environment.
Copy the extension ID from the VS Code Marketplace (or right-click the extension in the Extensions panel and choose Copy Extension ID), then run this in the remote terminal:
code --install-extension <extension-id>Because you’re running code from inside the remote terminal session, VS Code installs it on the remote only — it won’t appear in your local extensions list.