8

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
DevonDahon
  • 7,460
  • 6
  • 69
  • 114
  • A related question is how to open multiple folders of remote (ssh) and local in the same workspace. Well that is not planned to be supported: https://github.com/microsoft/vscode-remote-release/issues/706 – Noam Manos Mar 31 '23 at 04:24

2 Answers2

12

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

Bharath
  • 358
  • 2
  • 9
4

Update 2023:

Easy solution: File > Add Folder to Workspace.

enter image description here

user3503711
  • 1,623
  • 1
  • 21
  • 32