pythonvisual-studio-codevscode-remote-ssh

vscode extensions need to re-install when I connect next time


When I use vscode Remote-SSH, I install some extensions in SSH server.
But when I connect ssh several days later, the extensions have disappeared which means I have to install again.


Solution

  • As far as I know, if you installed the extension on the SSH host, it'll not remove your extension.

    You can open your USER settings.json and add the following codes:

      "remote.SSH.defaultExtensions": [
        "ms-python.python",
        "ms-python.vscode-pylance"
      ]
    

    In this way, when you use SSH remote connection, the extension will always remain installed. Read document for more information about Managing extensions.