microsoft / microsoft/vscode-remote-release
Remote-ssh on windows can't connect to a default zsh shell linux server
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I could NOT successfully SSH to the remote machine, and the error was the SAME to what I saw in VS Code
Remote-SSH Log
Remote-SSH Log
[23:51:59.008] Log Level: 2
[23:51:59.011] SSH Resolver called for "ssh-remote+zzz", attempt 1
[23:51:59.014] remote.SSH.useLocalServer = false
[23:51:59.014] remote.SSH.useExecServer = true
[23:51:59.014] remote.SSH.bindHost = {}
[23:51:59.014] remote.SSH.showLoginTerminal = false
[23:51:59.014] remote.SSH.remotePlatform = {}
[23:51:59.014] remote.SSH.path =
[23:51:59.014] remote.SSH.configFile =
[23:51:59.014] remote.SSH.useFlock = true
[23:51:59.014] remote.SSH.lockfilesInTmp = false
[23:51:59.014] remote.SSH.localServerDownload = auto
[23:51:59.015] remote.SSH.remoteServerListenOnSocket = false
[23:51:59.015] remote.SSH.defaultExtensions = []
[23:51:59.015] remote.SSH.defaultExtensionsIfInstalledLocally = []
[23:51:59.015] remote.SSH.loglevel = 2
[23:51:59.015] remote.SSH.enableDynamicForwarding = true
[23:51:59.015] remote.SSH.enableRemoteCommand = false
[23:51:59.015] remote.SSH.serverPickPortsFromRange = {}
[23:51:59.015] remote.SSH.serverInstallPath = {}
[23:51:59.015] remote.SSH.permitPtyAllocation = false
[23:51:59.015] remote.SSH.preferredLocalPortRange = undefined
[23:51:59.015] remote.SSH.useCurlAndWgetConfigurationFiles = false
[23:51:59.015] remote.SSH.experimental.chat = true
[23:51:59.015] remote.SSH.experimental.enhancedSessionLogs = true
[23:51:59.015] remote.SSH.httpProxy = {"*":""}
[23:51:59.015] remote.SSH.httpsProxy = {"*":""}
[23:51:59.019] VS Code version: 1.104.1
[23:51:59.019] Remote-SSH version: remote-ssh@0.120.0
[23:51:59.019] win32 x64
[23:51:59.021] SSH Resolver called for host: zzz
[23:51:59.021] Setting up SSH remote "zzz"
[23:51:59.027] Using commit id "0f0d87fa9e96c856c5212fc86db137ac0d783365" and quality "stable" for server
[23:51:59.027] Extensions to install:
[23:51:59.030] Install and start server if needed
[23:52:00.407] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V"
[23:52:00.408] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[23:52:00.408] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[23:52:00.409] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[23:52:00.409] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[23:52:00.410] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[23:52:00.410] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[23:52:00.410] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[23:52:00.410] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[23:52:00.411] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[23:52:00.411] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[23:52:00.439] > OpenSSH_for_Windows_9.5p2, LibreSSL 3.8.2
[23:52:00.446] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 19040 "zzz" sh
[23:52:00.447] Generated SSH command: 'type "C:\Users\huahua\AppData\Local\Temp\vscode-linux-multi-line-command-zzz-823197071.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 19040 "zzz" sh'
[23:52:00.447] Using connect timeout of 17 seconds
[23:52:00.448] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[23:52:00.631] >
[23:52:00.631] Got some output, clearing connection timeout
[23:52:00.987] > zehua.zou@zehua.zou@xxx.xxx.xxx.xxx@yyy.yyy.yyy.yyy's password:
[23:52:00.987] Showing password prompt
[23:52:08.298] Got password response
[23:52:08.298] "install" wrote data to terminal: "**************"
[23:52:08.320] >
[23:52:08.780] >
> Welcome to Alibaba Cloud Elastic Compute Service !Updates Information Summary: available
> 54 Security notice(s)
> 28 Important Security notice(s)
> 26 Moderate Security notice(s)
> Run "dnf upgrade-minimal --security" to apply all updates.More details please refer to:
> https://help.aliyun.com/document_detail/416274.html
[23:52:08.840] > d53bfbd001eb: running
> Script executing under PID: 3285280
[23:52:08.856] > Found existing installation at /home/zehua.zou/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /home/zehua.zou/.vscode-server/.cli.0f0d87fa9e96c856c5212fc86db137ac0d783365.log
> Spawned remote CLI: 3285324
[23:52:08.870] > Waiting for server log...
[23:52:08.902] > Exec server process not found
> [2025-09-19 23:52:09] error could not parse `host`: invalid IP address syntax
> d53bfbd001eb: start
> listeningOn====
> osReleaseId==alinux==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1082==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==47==
> execServerToken==1a11aa11-1a11-1a1a-a111-a11a1a1aaaa1==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> d53bfbd001eb: end
[23:52:08.902] Received install output:
listeningOn====
osReleaseId==alinux==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1082==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==47==
execServerToken==1a11aa11-1a11-1a1a-a111-a11a1a1aaaa1==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK====
DISPLAY====
[23:52:08.902] Failed to parse remote port from server output
[23:52:08.902] Resolver error: Error
at y.Create (c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:744751)
at t.handleInstallOutput (c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:742832)
at t.tryInstall (c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:865534)
at async c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824246
at async t.withShowDetailsEvent (c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:827501)
at async A (c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:820760)
at async t.resolve (c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824898)
at async c:\Users\huahua\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:1113660
[23:52:08.904] ------
Expected Behavior
Connect successfully.
Actual Behavior
Can't connect to server.
Steps To Reproduce
Remote-ssh generates such a command to connect to the server: type "C:\Users\huahua\AppData\Local\Temp\vscode-linux-multi-line-command-zzz-818108032.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 41606 "zzz" sh.
In this vscode-linux-multi-line-command-zzz-818108032.sh, there is a variable LISTEN_ARGS="--on-host=127.0.0.1 --on-port". It will be passed to VSCODE_CLI_REQUIRE_TOKEN=${TOKEN} "$CLI_PATH" command-shell --cli-data-dir "$VSCODE_AGENT_FOLDER/cli" --parent-process-id $$ ${LISTEN_ARGS} > "$CLI_LOG_FILE" 2>&1 < /dev/null &.
Zsh will quote the variable and generates a command ... --parent-process-id xxxxxx "--on-host=127.0.0.1 --on-port" > ./cli .... code will report error could not parse `host`: invalid IP address syntax. I guess this command in this script may be generated only in Windows. I have tested that remote-ssh on linux vscode can connect to the server but I didn't check the content of script generated by remote-ssh on linux.
After I run chsh -s /bin/bash username on the linux server, I can use remote-ssh on Windows to connect to it.
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows Remote-SSH command shown in the issue and inspect the generated vscode-linux-multi-line-command-zzz-818108032.sh, especially LISTEN_ARGS and the command-shell invocation. Compare behavior with a default zsh shell and bash; done means Remote-SSH connects successfully without the invalid IP address syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- zsh
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100