4

I am trying to change the VS Code server folder install location. The functionality was recently implemented and I've found the following references [1], [2]. However, I have not been able to implement it myself and in trying I get the following error message:

C:\\Users\\username/.ssh/config: line 1: Bad configuration option: remote.ssh.serverinstallpath 
C:\\Users\\username/.ssh/config: terminating, 1 bad configuration options

The config file is constructed in the following way

"remote.SSH.serverInstallPath": {"hostname": "/test/location"}

Host hostname
  HostName hostname
  User username

NOTE: I have obscured the connection as 'hostname' and the user as 'username'

Volumunox
  • 55
  • 1
  • 5

1 Answers1

6

This config is for vscode's settings.json file (not .ssh/config):

e.g on Windows, do Ctrl+Shift+P > "Preferences: Open User Settings (JSON)". Then, you can add the following lines at the end.

"remote.SSH.serverInstallPath": {
    "<host>": "/test/location"
}

Alternative, if you want do it via settings UI:

  1. File > Preferences > Settings
  2. Filter: @ext:ms-vscode-remote.remote-ssh install
  3. Under "Server Install Path" > Add Item
    • Item = <host>
    • Value = /test/location
shreyansp
  • 723
  • 1
  • 7
  • 16
  • 1
    Can you give an example for `` It's not clear whether it refers to the SSH hostname or some other identifier. – Gecko Jun 02 '23 at 14:20
  • If anyone comes across this question, the "Host" refers to the same value specified in your SSH config file "Host" field. – Tamás H Aug 11 '23 at 06:38