Search code examples
visual-studio-codevscode-remote

How to set multiple folders for a server in VSCode SSH TARGETS?


How to set multiple folders for a server in SSH TARGETS of VSCode Remote Explorer ?

SSH TARGETS
  10.0.1.123
    MyWebSite1 /var/www

I need to add MyWebSite2:

SSH TARGETS
  10.0.1.123
    MyWebSite1 /var/www
    MyWebSite2 /var/www

Solution

  • You have connect to the same host again (ex:10.0.1.123) and once logged in, select a folder to open Ex: /home/project1/src or /root/myapp/code. Every "entry point" folder you select for that host, will be listing in the explorer. More details here

    1. Right Click on Host or click the Add button
    2. Connect SSH target (either New window or same)
    3. Provide the path of the folder or choose File > Open Folder

    SSH connections with multiple entrypoints