I added a new remote host, and saved configuration in ssh_config AND config file.
When I open that file, everything looks ok, both User and Host values. However, when extension asks me for a password, I can see that it doesn't use myuser@myremotehost values that are written in ssh_config/config files, instead it uses the correct host but it uses my windows username instead of the username I set in ssh_config AND config file.
I can remote connect to it via PuTTy and via Powershell/cmd, so it's basically working.
Same issue here.
I can ssh to the machine using openssh from a shell
This implies that it is not actually using the ssh config. Did you set the User xyz property on your ssh config? Can you share your config and the log from the Remote-SSH output channel?
Remote SSH is broken for Linux too. Since updating to vscode 1.43.0 and Remote SSH 0.50.0 a few hours ago.
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host se204
HostName se204
User engineer
Host se206
HostName se206
User engineer
Host sl92
HostName sl92
User engineer
[16:20:59.430] Log Level: 2
[16:20:59.436] [email protected]
[16:20:59.436] win32 x64
[16:20:59.437] SSH Resolver called for "ssh-remote+se206", attempt 1
[16:20:59.438] SSH Resolver called for host: se206
[16:20:59.438] Setting up SSH remote "se206"
[16:20:59.441] Acquiring local install lock: C:\Users\MY_USER_NAME\AppData\Local\Temp\vscode-remote-ssh-se206-install.lock
[16:20:59.455] Looking for existing server data file at c:\Users\MY_USER_NAME\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-se206-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[16:20:59.456] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[16:20:59.457] Install and start server if needed
[16:20:59.463] Checking ssh with "ssh -V"
[16:20:59.514] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:20:59.515] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[16:20:59.554] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:20:59.554] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[16:20:59.613] > OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
[16:20:59.615] askpass server listening on \\.\pipe\vscode-ssh-askpass-bbb6042dfc902f27dab2c791429b274d7c4764d4-sock
[16:20:59.616] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-6e1d5b19df0d057d3e27142638dc72b8f6dda14e-sock","sshCommand":"C:\\Program Files\\Git\\usr\\bin\\ssh.exe","sshArgs":["-v","-T","-D","54210","se206"],"dataFilePath":"c:\\Users\\MY_USER_NAME\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-se206-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[16:20:59.616] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\MY_USER_NAME\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Program Files\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\MY_USER_NAME\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-bbb6042dfc902f27dab2c791429b274d7c4764d4-sock"}
[16:20:59.623] Spawned 13612
[16:20:59.713] > local-server> Spawned ssh: 25372
[16:20:59.759] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
[16:20:59.996] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:j454yxsQRteIcsotE3/qE1OwodWwdl4FgbpIL/ycyhY
[16:21:00.185] Got askpass request: {"request":"MY_USER_NAME@se206's password: "}
[16:21:00.186] Showing password prompt
[16:21:00.187] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-28214767405cc73c4765a7f0ffe32656af929dc1-sock
[16:21:00.187] Writing password prompt to globalState
Does disabling remote.SSH.useLocalServer fix it?
Does disabling
remote.SSH.useLocalServerfix it?
Yup, now it uses the correct username.
I still have issues connecting to a remote windows machine. Default shell for the remote windows machine is PowerShell v5.1. I double confirmed I can SSH to the machine using openssh and putty.
[08:02:59.623] Log Level: 2
[08:02:59.630] [email protected]
[08:02:59.630] win32 x64
[08:02:59.632] SSH Resolver called for "ssh-remote+sl92", attempt 1
[08:02:59.632] SSH Resolver called for host: sl92
[08:02:59.632] Setting up SSH remote "sl92"
[08:02:59.649] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[08:02:59.650] Install and start server if needed
[08:02:59.653] Checking ssh with "ssh -V"
[08:02:59.704] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[08:02:59.706] Running script with connection command: ssh -T -D 55746 sl92 bash
[08:02:59.708] Terminal shell path: C:\Windows\System32\cmd.exe
[08:02:59.756] >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ]0;C:\Windows\System32\cmd.exe
[08:02:59.756] Got some output, clearing connection timeout
[08:02:59.764] >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
[08:02:59.968] > engineer@sl92's password:
[08:02:59.968] Showing password prompt
[08:03:02.424] Got password response
[08:03:02.424] "install" wrote data to terminal: "****"
[08:03:02.438] >
>
[08:03:02.758] > bash : The term 'bash' is not recognized as the name of a cmdlet, function,
>
[08:03:02.770] > script file, or operable program. Check the spelling of the name, or if a path
> was included, verify that the path is correct and try again.
> At line:1 char:1
> + bash
> + ~~~~
> + CategoryInfo : ObjectNotFound: (bash:String) [], CommandNotFoun
> dException
> + FullyQualifiedErrorId : CommandNotFoundException
>
>
[08:03:03.054] "install" terminal command done
[08:03:03.055] Install terminal quit with output: + FullyQualifiedErrorId : CommandNotFoundException
[08:03:03.055] Received install output: + FullyQualifiedErrorId : CommandNotFoundException
[08:03:03.055] Stopped parsing output early. Remaining text: + FullyQualifiedErrorId : CommandNotFoundException
[08:03:03.055] Failed to parse remote port from server output
[08:03:03.056] Resolver error:
[08:03:03.058] ------
With useLocalServer disabled, you will also have to add the remote hostname to the remote.SSH.windowsRemotes setting list.
Another suggestion, to use this with useLocalServer enabled, I think setting "remote.SSH.path": "C:\\Windows\\System32\\OpenSSH\\ssh.exe" would fix it.
I can't leave useLocalServer enabled, doing so results in the wrong username for all of my remotes machine.
After adding the windows host PC name to remote.SSH.windowsRemotes
The default shell for this machine is powershell 5.1.
remote ssh output
[16:11:16.812] Log Level: 2
[16:11:16.817] [email protected]
[16:11:16.818] win32 x64
[16:11:16.819] SSH Resolver called for "ssh-remote+sl92", attempt 1
[16:11:16.820] SSH Resolver called for host: sl92
[16:11:16.820] Setting up SSH remote "sl92"
[16:11:16.837] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[16:11:16.838] Install and start server if needed
[16:11:16.841] Checking ssh with "ssh -V"
[16:11:16.935] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:11:16.936] Remote command length: 7504/8192 characters
[16:11:16.938] Running script with connection command: ssh -T -D 58551 sl92 powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile -NonInteractive -Command "$e=[Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('CmVjaG8gIjY1OGRiYTMyMDNhOTogcnVubmluZyIKJFByb2dyZXNzUHJlZmVyZW5jZSA9ICdTaWxlbnRseUNvbnRpbnVlJwokY29tbWl0SWQgPSAnNzhhNGM5MTQwMDE1MmMwZjI3YmE0ZDM2M2ViNTZkMjgzNWY5OTAzYScKCiR2c2NvZGVBcmNoID0gaWYgKCgkZW52OlBST0NFU1NPUl9BUkNISVRFQ1RVUkUgLWVxICdBTUQ2NCcpIC1vciAoJGVudjpQUk9DRVNTT1JfQVJDSElURUNUVVJFIC1lcSAnSUE2NCcpKSB7ICd4NjQnIH0gZWxzZSB7ICdpYTMyJyB9Cgokc2VydmVyUm9vdCA9IChKb2luLVBhdGggKFJlc29sdmUtUGF0aCB+KSAnLnZzY29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0cmluZygpKSIKfSBmaW5hbGx5IHsKJGZpbGUuQ2xvc2UoKQp9CgoKdHJ5IHsKJHdpblZlcnNpb24gPSAoR2V0LUNpbUluc3RhbmNlIFdpbjMyX09wZXJhdGluZ1N5c3RlbSkuVmVyc2lvbgp9IGNhdGNoIHsKZWNobyAiRmFpbGVkIHRvIGZpbmQgV2luZG93cyB2ZXJzaW9uIC0gJCgkXy5Ub1N0cmluZygpKSIKJHdpblZlcnNpb24gPSAidW5rbm93biIKfQoKZWNobyAiNjU4ZGJhMzIwM2E5OiBzdGFydCIKZWNobyAic3NoQXV0aFNvY2s9PSRlbnY6U1NIX0FVVEhfU09DSz09IgplY2hvICJhZ2VudFBvcnQ9PSRwb3J0PT0iCmVjaG8gIm9zUmVsZWFzZUlkPT13aW5kb3dzPT0iCmVjaG8gIm9zVmVyc2lvbj09JHdpblZlcnNpb249PSIKZWNobyAiYXJjaD09JHZzY29kZUFyY2g9PSIKZWNobyAicGxhdGZvcm09PXdpbmRvd3M9PSIKZWNobyAiNjU4ZGJhMzIwM2E5OiBlbmQiCgoKCmVjaG8gIkluc3RhbGwgc2NyaXB0IGlzICRwaWQsIHdhdGNoaW5nIHNzaGQgcGFyZW50ICRzc2hkUElEIgp3aGlsZSAoJFRydWUpIHsKZXhpdElmTmVlZGVkClN0YXJ0LVNsZWVwIDMwCn0K')))); powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile -NonInteractive -EncodedCommand $e"
[16:11:16.940] Terminal shell path: C:\Windows\System32\cmd.exe
[16:11:17.066] >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ]0;C:\Windows\System32\cmd.exe
[16:11:17.066] Got some output, clearing connection timeout
[16:11:17.074] >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
[16:11:17.336] > engineer@sl92's password:
[16:11:17.336] Showing password prompt
[16:11:19.780] Got password response
[16:11:19.781] "install" wrote data to terminal: "****"
[16:11:19.795] >
>
[16:11:20.404] > =[Convert]::ToBase64String : The term '=[Convert]::ToBase64String' is not
>
[16:11:20.412] > recognized as the name of a cmdlet, function, script file, or operable
> program. Check the spelling of the name, or if a path was included, verify
> that the path is correct and try again.
> At line:1 char:1
> + =[Convert]::ToBase64String 10 0 101 0 99 0 104 0 111 0 32 0 34 0 54 0 ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : ObjectNotFound: (=[Convert]::ToBase64String:Stri
> ng) [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
>
>
[16:11:20.465] > Cannot process the command because of a missing parameter. A command must follow
> -Command.
>
[16:11:20.471] >
> PowerShell[.exe] [-PSConsoleFile <file> | -Version <version>]
> [-NoLogo] [-NoExit] [-Sta] [-Mta] [-NoProfile] [-NonInteractive]
> [-InputFormat {Text | XML}] [-OutputFormat {Text | XML}]
> [-WindowStyle <style>] [-EncodedCommand <Base64EncodedCommand>]
> [-ConfigurationName <string>]
> [-File <filePath> <args>] [-ExecutionPolicy <ExecutionPolicy>]
> [-Command { - | <script-block> [-args <arg-array>]
> | <string> [<CommandParameters>] } ]
>
> PowerShell[.exe] -Help | -? | /?
>
> -PSConsoleFile
> Loads the specified Windows PowerShell console file. To create a console
> file, use Export-Console in Windows PowerShell.
>
> -Version
> Starts the specified version of Windows PowerShell.
> Enter a version number with the parameter, such as "-version 2.0".
>
> -NoLogo
> Hides the copyright banner at startup.
>
[16:11:20.475] >
> -NoExit
> Does not exit after running startup commands.
>
> -Sta
> Starts the shell using a single-threaded apartment.
> Single-threaded apartment (STA) is the default.
>
> -Mta
> Start the shell using a multithreaded apartment.
>
> -NoProfile
> Does not load the Windows PowerShell profile.
>
> -NonInteractive
> Does not present an interactive prompt to the user.
>
> -InputFormat
> Describes the format of data sent to Windows PowerShell. Valid values are
> "Text" (text strings) or "XML" (serialized CLIXML format).
>
[16:11:20.480] >
> -OutputFormat
> Determines how output from Windows PowerShell is formatted. Valid values
> are "Text" (text strings) or "XML" (serialized CLIXML format).
>
> -WindowStyle
> Sets the window style to Normal, Minimized, Maximized or Hidden.
>
> -EncodedCommand
> Accepts a base-64-encoded string version of a command. Use this parameter
> to submit commands to Windows PowerShell that require complex quotation
> marks or curly braces.
>
> -ConfigurationName
> Specifies a configuration endpoint in which Windows PowerShell is run.
> This can be any endpoint registered on the local machine including the
> default Windows PowerShell remoting endpoints or a custom endpoint having
> specific user role capabilities.
>
> -File
> Runs the specified script in the local scope ("dot-sourced"), so that the
> functions and variables that the script creates are available in the
> current session. Enter the script file path and any parameters.
[16:11:20.488] >
> File must be the last parameter in the command, because all characters
> typed after the File parameter name are interpreted
> as the script file path followed by the script parameters.
>
> -ExecutionPolicy
> Sets the default execution policy for the current session and saves it
> in the $env:PSExecutionPolicyPreference environment variable.
> This parameter does not change the Windows PowerShell execution policy
> that is set in the registry.
>
> -Command
> Executes the specified commands (and any parameters) as though they were
> typed at the Windows PowerShell command prompt, and then exits, unless
> NoExit is specified. The value of Command can be "-", a string. or a
> script block.
>
> If the value of Command is "-", the command text is read from standard
> input.
>
> If the value of Command is a script block, the script block must be enclosed
>
> in braces ({}). You can specify a script block only when running PowerShell.
> exe
> in Windows PowerShell. The results of the script block are returned to the
> parent shell as deserialized XML objects, not live objects.
>
> If the value of Command is a string, Command must be the last parameter
> in the command , because any characters typed after the command are
> interpreted as the command arguments.
>
[16:11:20.494] >
> To write a string that runs a Windows PowerShell command, use the format:
> "& {<command>}"
> where the quotation marks indicate a string and the invoke operator (&)
> causes the command to be executed.
>
> -Help, -?, /?
> Shows this message. If you are typing a PowerShell.exe command in Windows
> PowerShell, prepend the command parameters with a hyphen (-), not a forward
> slash (/). You can use either a hyphen or forward slash in Cmd.exe.
>
> EXAMPLES
> PowerShell -PSConsoleFile SqlSnapIn.Psc1
> PowerShell -version 2.0 -NoLogo -InputFormat text -OutputFormat XML
> PowerShell -ConfigurationName AdminRoles
> PowerShell -Command {Get-EventLog -LogName security}
> PowerShell -Command "& {Get-EventLog -LogName security}"
>
> # To use the -EncodedCommand parameter:
> $command = 'dir "c:\program files" '
> $bytes = [System.Text.Encoding]::Unicode.GetBytes($command)
> $encodedCommand = [Convert]::ToBase64String($bytes)
> powershell.exe -encodedCommand $encodedCommand
>
[16:11:20.794] "install" terminal command done
[16:11:20.794] Install terminal quit with output: powershell.exe -encodedCommand $encodedCommand
[16:11:20.795] Received install output: powershell.exe -encodedCommand $encodedCommand
[16:11:20.795] Stopped parsing output early. Remaining text: powershell.exe -encodedCommand $encodedCommand
[16:11:20.795] Failed to parse remote port from server output
[16:11:20.796] Resolver error:
[16:11:20.800] ------
Ok, if you have powershell as the default shell for ssh on the remote, then useLocalServer:false will not work.
I can't leave useLocalServer enabled, doing so results in the wrong username for all of my remotes machine.
I think that setting remote.SSH.path would fix that. If I'm wrong, then setting remote.SSH.configFile explicitly to your config file might fix it.
Sorry for this trouble, thanks for your patience.
Results with the settings useLocalServer: true and "remote.SSH.path": "C:\\Windows\\System32\\OpenSSH\\ssh.exe". Hopefully in the future I won't need to set this config option since vscode was already abled to find the ssh.exe.
With these changes the prompt is incomplete but it's wanting me to enter the password.

I was able to connect to a remote Linux PC with these settings.
Still issues connecting to a Windows PC. This failure is making think it might be something on the remote windows side now.
remote ssh output remote windows PC
[10:05:56.398] Log Level: 2
[10:05:56.406] [email protected]
[10:05:56.406] win32 x64
[10:05:56.408] SSH Resolver called for "ssh-remote+sl92", attempt 1
[10:05:56.409] SSH Resolver called for host: sl92
[10:05:56.409] Setting up SSH remote "sl92"
[10:05:56.413] Acquiring local install lock: C:\Users\MY_USERNAME\AppData\Local\Temp\vscode-remote-ssh-sl92-install.lock
[10:05:56.432] Looking for existing server data file at c:\Users\MY_USERNAME\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-sl92-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[10:05:56.434] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[10:05:56.436] Install and start server if needed
[10:05:56.442] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[10:05:56.498] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[10:05:56.500] askpass server listening on \\.\pipe\vscode-ssh-askpass-579169b469abc62c823c951095c36d2d25f864b4-sock
[10:05:56.501] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-cbfb7dbd7a3a276b69f44f1e302de9e0cb7ce87a-sock","sshCommand":"C:\\Windows\\System32\\OpenSSH\\ssh.exe","sshArgs":["-v","-T","-D","49627","sl92"],"dataFilePath":"c:\\Users\\MY_USERNAME\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-sl92-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[10:05:56.501] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\MY_USERNAME\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Program Files\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\MY_USERNAME\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-579169b469abc62c823c951095c36d2d25f864b4-sock"}
[10:05:56.508] Spawned 22388
[10:05:56.599] > local-server> Spawned ssh: 2116
[10:05:56.630] stderr> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[10:05:56.727] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:kUZusHekV+ojgPCkz/zGjmYEVntjNHw4sBTy5GlRfzI
[10:05:56.926] Got askpass request: {"request":""}
[10:05:56.928] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-015f33aceda6ef3b1cb088b0dc956c0e6ece4779-sock
[10:05:56.928] Writing password prompt to globalState
[10:07:15.821] Interactor gave response: ****
[10:07:15.821] Cleaning up other-window auth server
[10:07:15.855] stderr> Authenticated to sl92 ([172.16.20.132]:22).
[10:07:15.949] stderr> shell request failed on channel 2
[10:07:15.953] > local-server> ssh child died, shutting down
[10:07:15.961] Local server exit: 0
[10:07:15.962] Received install output: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:kUZusHekV+ojgPCkz/zGjmYEVntjNHw4sBTy5GlRfzI
Authenticated to sl92 ([172.16.20.132]:22).
shell request failed on channel 2
[10:07:15.963] Stopped parsing output early. Remaining text: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5debug1: Server host key: ecdsa-sha2-nistp256 SHA256:kUZusHekV+ojgPCkz/zGjmYEVntjNHw4sBTy5GlRfzIAuthenticated to sl92 ([172.16.20.132]:22).shell request failed on channel 2
[10:07:15.963] Failed to parse remote port from server output
[10:07:15.964] Resolver error:
[10:07:15.966] ------
The empty prompt is due to a bug in the local windows ssh client. This is why we try to use the git ssh client if available.
shell request failed on channel 2 you must have a version of the ssh client installed on the server which is newer than the one that is available by default. How did you install ssh on the server? There is an open issue for that as well.
SSH on the Windows 10 local PC was installed via optional features. It'd be nice for MS to update the "inbox optional features". There are several useful bug fixes in the newer windows openssh binaries. I'm sure that is a different team then VS Code Remote extension.
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
ssh -Version
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
SSH on the Windows 8.1 remote PC was installed using choco.
choco install openssh -y -params '"/SSHServerFeature /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"'
sshd -Version
unknown option -- V
OpenSSH_for_Windows_8.0p1, LibreSSL 2.6.5
Please provide the related issue # so I can track the status of it.
@soul4soul That issue is https://github.com/microsoft/vscode-remote-release/issues/2475
I am pushing a change which should fix this into the next build of the Nightly version of the SSH extension - would appreciate if people try it out. I'll post again when the build is released.
Until then, the best workaround is to configure the ssh config file manually:
"remote.SSH.configFile": "c:\\Users\\username\\.ssh\\config" // update for your username/config file path
@roblourens, i tried the latest nightly, but i still can not connect to my remote..
Sorry for answering/reacting to your ideas so lately. Was sick.
I tried all the different suggestions from @roblourens like @soul4soul did.
Exactly the same results and outputs as @soul4soul.
I can still ssh into via Putty.
Prompting the correct Username but now can't connect via VS Code because either
Resolver error: Connecting with SSH timed out
or
Failed to parse remote port from server output
like @soul4soul.
The Nightly build of the extension with the fix just went out, please try it out.
Used VS Code Insiders (hopefully correct to get the nightly build) to test the following preferences and got these results:
Explanation
"remote.SSH.windowsRemotes": ["hostname"], = Windows Remote
"remote.SSH.path": "C:\\Windows\\System32\\OpenSSH\\ssh.exe", = Path
"remote.SSH.useLocalServer": false/true, = Local Server
"remote.SSH.configFile": "c:\\Users\\Username\\.ssh\\config", = Config File
+ = Active/True/Filled in
- = Off/False/Left Blank
Results
"+ Windows Remote + Path + Local Server + Config File":
Resolver error: Connecting with SSH timed out
"+ Windows Remote - Path + Local Server + Config File":
Resolver error: Connecting with SSH timed out
"+ Windows Remote - Path + Local Server - Config File":
Resolver error: Connecting with SSH timed out
"- Windows Remote + Path + Local Server + Config File":
Resolver error: Connecting with SSH timed out
"- Windows Remote + Path + Local Server - Config File":
Resolver error: Connecting with SSH timed out
"+ Windows Remote + Path - Local Server - Config File":
Failed to parse remote port from server output -> Resolver error
"+ Windows Remote + Path - Local Server + Config File":
Failed to parse remote port from server output -> Resolver error
"+ Windows Remote + Path - Local Server - Config File":
Failed to parse remote port from server output -> Resolver error
"- Windows Remote + Path - Local Server - Config File":
Failed to create the remote server's install directory
"- Windows Remote - Path - Local Server - Config File":
Failed to create the remote server's install directory
This is in the nightly build of the _extension_, you need to install that but you don't need to use vscode insiders. And the fix should fix it without any of those settings set. But thanks for the detailed test!
Oh, sorry, I missunderstood. I tried it with the nightly extension. Still doesn't work but I don't get any error messages anymore. It just stays at "Setting up SSH Host ..."

Remote-SSH Output is:
````
[06:58:39.223] Log Level: 2
[06:58:39.239] [email protected]
[06:58:39.239] win32 x64
[06:58:39.242] SSH Resolver called for "ssh-remote+172.19.160.239", attempt 1
[06:58:39.243] SSH Resolver called for host: 172.19.160.239
[06:58:39.243] Setting up SSH remote "172.19.160.239"
[06:58:40.598] Acquiring local install lock: C:\Users\sndp\AppData\Local\Temp\vscode-remote-ssh-172.19.160.239-install.lock
[06:58:40.621] Looking for existing server data file at c:\Users\sndp\AppDataRoaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh-nightly\vscode-ssh-host-172.19.160.239-fe22a9645b44368865c0ba92e2fb881ff1afce94-2020.3.25802\data.json
[06:58:40.622] Using commit id "fe22a9645b44368865c0ba92e2fb881ff1afce94" and quality "stable" for server
[06:58:40.624] Install and start server if needed
[06:58:40.631] Checking ssh with "ssh -V"
[06:58:40.723] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[06:58:40.723] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[06:58:40.799] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[06:58:40.799] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[06:58:41.623] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[06:58:41.628] Using SSH config file "C:\Users\sndp.ssh\config"
[06:58:41.629] askpass server listening on \.\pipe\vscode-ssh-askpass-837773870bb0cd22edb8f9cf4e74146da700c21c-sock
[06:58:41.629] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-03eca9bd183f30740bc0366a69413ca8e0b03fc4-sock","sshCommand":"C:\Program Files\Git\usr\bin\ssh.exe","sshArgs":["-v","-T","-D","53370","-F","C:\Users\sndp\.ssh\config","172.19.160.239"],"dataFilePath":"c:\Users\sndp\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh-nightly\vscode-ssh-host-172.19.160.239-fe22a9645b44368865c0ba92e2fb881ff1afce94-2020.3.25802\data.json"}
[06:58:41.629] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\sndp\.vscode\extensions\ms-vscode-remote.remote-ssh-nightly-2020.3.25802\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\sndp\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\sndp\.vscode\extensions\ms-vscode-remote.remote-ssh-nightly-2020.3.25802\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-837773870bb0cd22edb8f9cf4e74146da700c21c-sock"}
[06:58:41.707] Spawned 9508
[06:58:41.876] > local-server> Spawned ssh: 20036
[06:58:41.952] stderr> OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[06:58:42.122] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:nUpI/kkZrhxNm4ViPLtk/F3EQxKntD7zHdO3PJmUSDk
[06:58:42.479] Got askpass request: {"request":"The authenticity of host '172.19.160.239 (172.19.160.239)' can't be established."}
[06:58:42.480] Detected first line fingerprint confirmation message
[06:58:42.480] Showing fingerprint confirmation dialog
[06:58:42.481] Listening for interwindow password on \.\pipe\vscode-ssh-askpass-7e897798926b97a9e8c54365bd1f95ddb2553509-sock
[06:58:42.481] Writing password prompt to globalState
[06:58:43.944] Got fingerprint response: yes
[06:58:43.944] Interactor gave response: yes
[06:58:43.945] Cleaning up other-window auth server
[06:58:43.990] stderr> Failed to add the host to the list of known hosts (/h/.ssh/known_hosts).
[06:58:44.379] Got askpass request: {"request":"[email protected]'s password: "}
[06:58:44.379] Showing password prompt
[06:58:44.380] Listening for interwindow password on \.\pipe\vscode-ssh-askpass-84f28cfc9af67f30979ede97f17e07ed759e6393-sock
[06:58:44.380] Writing password prompt to globalState
[06:58:47.790] Got password response
[06:58:47.791] Interactor gave response: **
[06:58:47.791] Cleaning up other-window auth server
[06:58:47.909] > echo 'ready: 44da3129404a'
[06:58:47.915] > uname -rsv
[06:58:48.237] > Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
[06:58:49.550] > PS C:\Users\sndp>
[06:58:49.911] > echo 'ready: 44da3129404a'
[06:58:49.949] > ready: 44da3129404a
[06:58:49.975] > PS C:\Users\sndp> uname -rsv
[06:58:50.422] stderr> uname : The term 'uname' is not recognized as the name of a cmdlet, function, script file, or
[06:58:50.422] stderr> operable program. Check the spelling of the name, or if a path was included, verify that the path
[06:58:50.422] stderr> is correct and try again.
[06:58:50.422] stderr> At line:1 char:1
[06:58:50.422] stderr> + uname -rsv
[06:58:50.422] stderr> +~
[06:58:50.422] stderr> + CategoryInfo : ObjectNotFound: (uname:String) [], CommandNotFoundException
[06:58:50.422] stderr> + FullyQualifiedErrorId : CommandNotFoundException
[06:58:50.422] stderr>
[06:58:50.423] Platform: windows
[06:58:50.423] Remote command length: 7504/8192 characters
[06:58:50.428] > powershell -NoProfile
[06:58:50.483] > PS C:\Users\sndp> powershell -NoProfile
[06:58:50.811] > Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
[...]
[06:58:52.506] > xecutionPoli
[06:58:52.506] > cy
[06:58:52.508] > Unrestricted -NoLogo -
[06:58:52.508] > NoProfile -No
[06:58:52.509] > nInte
[06:58:52.510] > ractive -En
[06:58:52.510] > codedComm
[06:58:52.511] > and `$
[06:58:52.512] > remoteSS
[06:58:52.514] > HConfigurationScript
[06:58:52.515] > "
[06:58:55.716] stderr> #< CLIXML
[06:58:55.810] > 44da3129404a: running
[06:58:56.393] > Acquiring lock on C:\Users\sndp.vscode-server\bin\fe22a9645b44368865c0ba92e2fb881ff1afce94\vscode-remote-lock.fe22a9645b44368865c0ba92e2fb881ff1afce94
[06:58:56.394] > Looking for existing server in C:\Users\sndp.vscode-server\bin\fe22a9645b44368865c0ba92e2fb881ff1afce94
[06:58:56.407] > Downloading VS Code Server
44da3129404a%%1%%
[06:59:16.590] > Failed to download & extract vscode-server. - The operation has timed out.
Trigger client server download
44da3129404a:trigger_server_download
platform==windows==
vscodeArch==x64==
destFolder==C:\Users\sndp.vscode-server\bin\fe22a9645b44368865c0ba92e2fb881ff1afce94==
44da3129404a:trigger_server_download_end
Waiting for client to transfer server archive...
Waiting for C:\Users\sndp.vscode-server\bin\fe22a9645b44368865c0ba92e2fb881ff1afce94\vscode-scp-done.flag and vscode-server.zip to exist
[06:59:16.591] Got request to download on client for {"platform":"windows","arch":"x64","destFolder":"C:\Users\sndp\.vscode-server\bin\fe22a9645b44368865c0ba92e2fb881ff1afce94"}
[06:59:16.591] Downloading VS Code server locally...
[06:59:36.130] Downloaded VS Code server to c:\Users\sndp\AppData\Local\Temp\f3856e64-f9d4-44dd-9895-cf040d0cda76
[06:59:36.134] Renamed VS Code server to c:\Users\sndp\AppData\Local\Temp\vscode_server_1584597576130\vscode-server.zip
[06:59:36.143] Checking ssh with "ssh -V"
[06:59:36.225] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[06:59:36.225] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[06:59:36.299] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[06:59:36.300] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[06:59:36.391] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[06:59:36.391] Expecting scp to be next to ssh at C:\Program Files\Git\usr\bin\scp.exe
[06:59:36.392] Testing scp with "C:\Program Files\Git\usr\bin\scp.exe"
[06:59:36.789] scp exited with code: 1
[06:59:36.789] Got stderr from scp: usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
[-J destination] [-l limit] [-o ssh_option] [-P port]
[-S program] source ... target
[06:59:36.792] Using SSH config file "C:\Users\sndp.ssh\config"
[06:59:36.792] Copying file to remote with "C:\Program Files\Git\usr\bin\scp.exe" -F "C:\Users\sndp.ssh\config" vscode-server.zip vscode-scp-done.flag 172.19.160.239:"C:\Users\sndp.vscode-server\bin\fe22a9645b44368865c0ba92e2fb881ff1afce94"
[06:59:36.793] Using cwd: file:///c%3A/Users/sndp/AppData/Local/Temp/vscode_server_1584597576130
[06:59:36.793] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[06:59:37.040] >
[06:59:37.382] > The authenticity of host '172.19.160.239 (172.19.160.239)' can't be established.ECDSA key fingerprint is SHA256:nUpI/kkZrhxNm4ViPLtk/F3EQxKntD7zHdO3PJmUSDk.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
[06:59:37.382] Detected fingerprint confirmation message
[06:59:37.382] Showing fingerprint confirmation dialog
[06:59:42.210] Got fingerprint response: yes
[06:59:42.211] "Copy server to host" wrote data to terminal: "yes"
[06:59:42.232] > Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Failed to add the host to the list of known hosts (/h/.ssh/known_hosts).[06:59:42.285] > [email protected]'s password:
[06:59:42.285] Showing password prompt
[06:59:46.049] Got password response
[06:59:46.050] "Copy server to host" wrote data to terminal: "**"
[06:59:46.071] >[06:59:46.261] > vscode-server.zip 0% 0 0.0KB/s --:-- ETA
[06:59:47.071] > vscode-server.zip 100% 34MB 43.1MB/s 00:00
vscode-scp-done.flag 100% 9 2.7KB/s 00:00[06:59:47.356] "Copy server to host" terminal command done
[06:59:49.643] > Found flag and server on host
[06:59:49.688] stderr>System.Management.Automation.PSCustomObject System.Object 1 Preparing modules for first use. 0 -1 -1 Completed -1 1 Preparing modules for first use. 0 -1 -1 Completed -1
[06:59:49.733] > PS C:\Users\sndp>
it is working for me with "remote.SSH.useLocalServer": false, setting
Does disabling
remote.SSH.useLocalServerfix it?
This worked for me.
@sndp24152 I don't know why downloading the server failed on the remote - The operation has timed out. does the remote connect to the internet through a proxy?
Then it tries to download on the client and scp the result to the remote, and I think I have actually fixed that in the nightly version of the extension.
I'm using a corporate VPN (Home Office).
With the newest Build/Update i get the following Output:
The authenticity of host '172.17.84.182 (172.17.84.182)' can't be established.
RSA key fingerprint is SHA256:qNAdH7dfbrGsE0RAYg8JP3D/gY/uNcu/JTzfDmvIbHU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.17.84.182' (RSA) to the list of known hosts.
[email protected]'s password:
#< CLIXML
14ae725b6f1f: running
Acquiring lock on C:\Windows\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50\vscode-remote-lock.0ba0ca52957102ca3527cf479571617f0de6ed50
Looking for existing server in C:\Windows\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50
Downloading VS Code Server
14ae725b6f1f%%1%%
Failed to download & extract vscode-server. - The operation has timed out.
Trigger client server download
14ae725b6f1f:trigger_server_download
platform==windows==
vscodeArch==x64==
destFolder==C:\Windows\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50==
14ae725b6f1f:trigger_server_download_end
Waiting for client to transfer server archive...
Waiting for C:\Windows\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50\vscode-scp-done.flag and vscode-server.zip to exist
Found flag and server on host
Expanding server into C:\Windows\AppData\Local\Temp\ymeb2rfc.3ub
14ae725b6f1f%%2%%
Starting server with command... & 'C:\Windows\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50\server.cmd' --host=127.0.0.1 --enable-remote-auto-shutdown --port=0 *> 'C:\Windows\.vscode-server\.0ba0ca52957102ca3527cf479571617f0de6ed50.log'
14ae725b6f1f: start
sshAuthSock====
agentPort==49166==
osReleaseId==windows==
osVersion==10.0.17763==
arch==x64==
platform==windows==
14ae725b6f1f: end
Install script is 1836, watching sshd parent 1048
I'm now connected via SSH.
But if I try to "Open Folder" it reloads the window and fails:
[10:56:27.563] Log Level: 2
[10:56:27.578] [email protected]
[10:56:27.578] win32 x64
[10:56:27.581] SSH Resolver called for "ssh-remote+172.17.84.182", attempt 1
[10:56:27.582] SSH Resolver called for host: 172.17.84.182
[10:56:27.582] Setting up SSH remote "172.17.84.182"
[10:56:29.098] Using commit id "0ba0ca52957102ca3527cf479571617f0de6ed50" and quality "stable" for server
[10:56:29.100] Install and start server if needed
[10:56:29.107] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[10:56:29.225] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[10:56:29.226] Remote command length: 7544/8192 characters
[10:56:29.230] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 63043 172.17.84.182 powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile -NonInteractive -Command "powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile -NonInteractive -EncodedCommand $([Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('LARGE_STRING') RemoteSSHConfigurationScript
[10:56:29.233] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[10:56:29.510] >
[10:56:29.510] Got some output, clearing connection timeout
[10:56:29.804] > [email protected]'s password:
[10:56:29.804] Showing password prompt
[10:56:33.427] Got password response
[10:56:33.427] "install" wrote data to terminal: "******"
[10:56:33.468] >
>
[10:56:38.403] > #< CLIXML
>
[10:56:38.519] > 1f63c3cf1425: running
>
[10:56:39.117] > Acquiring lock on C:\Users\sndp\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50\vscode-remote-lock.0ba0ca52957102ca3527cf479571617f0de6ed50
>
[10:56:39.180] > Looking for existing server in C:\Users\sndp\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50
>
[10:56:39.218] > Downloading VS Code Server
> 1f63c3cf1425%%1%%
>
[10:56:59.385] > Failed to download & extract vscode-server. - The operation has timed out.
> Trigger client server download
> 1f63c3cf1425:trigger_server_download
> platform==windows==
> vscodeArch==x64==
> destFolder==C:\Users\sndp\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50==
> 1f63c3cf1425:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for C:\Users\sndp\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50\vscode-scp-done.flag and vscode-server.zip to exist
>
[10:56:59.386] Got request to download on client for {"platform":"windows","arch":"x64","destFolder":"C:\\Users\\sndp\\.vscode-server\\bin\\0ba0ca52957102ca3527cf479571617f0de6ed50"}
[10:56:59.386] Downloading VS Code server locally...
[10:57:18.410] Downloaded VS Code server to c:\Users\sndp\AppData\Local\Temp\6b32f3a4-7e2f-4720-b084-1ef644dc2520
[10:57:18.415] Renamed VS Code server to c:\Users\sndp\AppData\Local\Temp\vscode_server_1585303038410\vscode-server.zip
[10:57:18.424] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[10:57:18.502] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[10:57:18.503] Expecting scp to be next to ssh at C:\WINDOWS\System32\OpenSSH\scp.exe
[10:57:18.503] Testing scp with "C:\WINDOWS\System32\OpenSSH\scp.exe"
[10:57:18.593] scp exited with code: 1
[10:57:18.593] Got stderr from scp: usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program] source ... target
[10:57:18.595] Copying file to remote with "C:\WINDOWS\System32\OpenSSH\scp.exe" vscode-server.zip vscode-scp-done.flag 172.17.84.182:"C:\Users\sndp\.vscode-server\bin\0ba0ca52957102ca3527cf479571617f0de6ed50"
[10:57:18.595] Using cwd: file:///c%3A/Users/sndp/AppData/Local/Temp/vscode_server_1585303038410
[10:57:18.595] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[10:57:18.810] >
[10:57:19.091] > [email protected]'s password:
[10:57:19.091] Showing password prompt
[10:57:23.476] Got password response
[10:57:23.477] "Copy server to host" wrote data to terminal: "******"
[10:57:23.526] >
>
[10:57:23.711] > vscode-server.zip 0% 0 0.0KB/s --:-- ETA
[10:57:24.218] > vscode-server.zip 100% 34MB 68.8MB/s 00:00
> vscode-scp-done.flag 100% 9 15.8KB/s 00:00
>
[10:57:24.493] "Copy server to host" terminal command done
[10:57:26.404] > Found flag and server on host
> Expanding server into C:\Users\sndp\AppData\Local\Temp\kiwpxt4m.eq1
> 1f63c3cf1425%%2%%
>
[10:57:33.473] > vscode-server with 0ba0ca52957102ca3527cf479571617f0de6ed50 is already running.
[10:57:33.499] >
>
[10:57:37.562] > Server did not start successfully. Full server log at C:\Users\sndp\.vscode-server\.0ba0ca52957102ca3527cf479571617f0de6ed50.log >>>
>
[10:57:37.747] > <<< End of server log
> 1f63c3cf1425##32##
>
[10:57:37.747] Received install output: 1f63c3cf1425##32##
[10:57:37.749] Resolver error: The VS Code Server failed to start
[10:57:37.759] ------
[10:57:38.219] > <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Ob
> ject</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS>
> </Obj><Obj S="progress" RefId="1"><TNRef RefId="0" /><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Comp
> leted</T><SR>-1</SR><SD> </SD></PR></MS></Obj><S S="Error">cat : Cannot find path _x000D__x000A_</S><S S="Error">'C:\Users\sndp\.vscode-server\.0ba0ca52957102ca3527cf479571617f0de6ed50
> .log' because it does not _x000D__x000A_</S><S S="Error">exist._x000D__x000A_</S><S S="Error">At line:200 char:1_x000D__x000A_</S><S S="Error">+ cat $logfile_x000D__x000A_</S><S S="Err
> or">+ ~~~~~~~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (C:\Users\sndp\....17f0de6ed50.log:String) [Get-Con _x000D__x000A_</S><S S="Error"> ten
> t], ItemNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand_x000D__x000A_</S><S S="Error"> _x000D
> __x000A_</S></Objs>
[10:57:38.405] "install" terminal command done
[10:57:38.406] Install terminal quit with output: __x000A_</S></Objs>
Sorry, I'm not sure, could you try running "Kill VS Code Server on Host" to start fresh on the remote?
Hi @roblourens, I'm not on any nightly builds but I'm experiencing the same issue described by @sndp24152 in his latest comment when trying to set up a new SSH remote from Windows to Windows.
It looks like the log file to where the start server command output should be redirected does not get created (C:\Users\sndp\.vscode-server\.0ba0ca52957102ca3527cf479571617f0de6ed50.log in the above example). Creating the file does not help, but starting the VS Code server running the full command (with double quotes and output redirection) on the machine itself makes it work and the client is then able to connect.
EDIT: now that I'm reading again, the behavior I described still stands but it looks like a different issue than the above (I can open a new one if needed)