microsoft / microsoft/vscode-remote-release
Garbage characters in terminal output break password prompt detection on Windows
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 successfully SSH to the remote machine with the generated SSH command
Remote-SSH Log
Remote-SSH Log
[09:54:46.939] Log Level: 2
[09:54:46.959] VS Code version: 1.115.0
[09:54:46.960] Remote-SSH version: remote-ssh@0.122.0
[09:54:46.960] win32 x64
[09:54:46.968] SSH Resolver called for "ssh-remote+192.168.5.173", attempt 1
[09:54:46.973] remote.SSH.useLocalServer = false
[09:54:46.974] remote.SSH.useExecServer = true
[09:54:46.974] remote.SSH.bindHost = {}
[09:54:46.974] remote.SSH.showLoginTerminal = false
[09:54:46.974] remote.SSH.remotePlatform = {"192.168.5.173":"linux"}
[09:54:46.974] remote.SSH.path =
[09:54:46.974] remote.SSH.configFile =
[09:54:46.974] remote.SSH.useFlock = true
[09:54:46.974] remote.SSH.lockfilesInTmp = false
[09:54:46.974] remote.SSH.localServerDownload = always
[09:54:46.975] remote.SSH.remoteServerListenOnSocket = false
[09:54:46.976] remote.SSH.defaultExtensions = ["ms-python.python","ms-toolsai.jupyter-renderers","ms-toolsai.jupyter-keymap","ms-toolsai.jupyter"]
[09:54:46.976] remote.SSH.defaultExtensionsIfInstalledLocally = []
[09:54:46.976] remote.SSH.loglevel = 2
[09:54:46.976] remote.SSH.enableDynamicForwarding = true
[09:54:46.976] remote.SSH.enableRemoteCommand = false
[09:54:46.976] remote.SSH.serverPickPortsFromRange = {}
[09:54:46.976] remote.SSH.serverInstallPath = {}
[09:54:46.976] remote.SSH.permitPtyAllocation = false
[09:54:46.976] remote.SSH.preferredLocalPortRange = undefined
[09:54:46.976] remote.SSH.useCurlAndWgetConfigurationFiles = false
[09:54:46.977] remote.SSH.experimental.chat = true
[09:54:46.977] remote.SSH.experimental.enhancedSessionLogs = true
[09:54:46.985] SSH Resolver called for host: 192.168.5.173
[09:54:46.985] Setting up SSH remote "192.168.5.173"
[09:54:46.993] Using commit id "41dd792b5e652393e7787322889ed5fdc58bd75b" and quality "stable" for server
[09:54:46.998] Install and start server if needed
[09:54:47.024] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[09:54:47.058] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
[09:54:47.062] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 37735 "192.168.5.173" sh
[09:54:47.063] Generated SSH command: 'type "C:\Users\MSI-NB\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.5.173-23962952.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 37735 "192.168.5.173" sh'
[09:54:47.064] Using connect timeout of 17 seconds
[09:54:47.064] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[09:54:47.300] >
[09:54:47.301] Got some output, clearing connection timeout
[09:54:47.313] >
[09:54:47.330] > 7 87 8
[09:54:47.589] > young@192.168.5.173's password:
[09:54:47.589] Showing password prompt
[09:54:53.986] Password dialog canceled
[09:54:53.987] "install" terminal command canceled
[09:54:53.987] Resolver error: Error: Canceled
[09:54:53.991] ------
[09:54:53.991] ---------- [Session Summary] -----------
[09:54:53.992] [Canceled]: Error: Canceled
[09:54:53.992] ----------------------------------------
[09:54:54.950] Opening exec server for ssh-remote+192.168.5.173
[09:54:55.161] Initizing new exec server for ssh-remote+192.168.5.173
[09:54:55.162] Using commit id "41dd792b5e652393e7787322889ed5fdc58bd75b" and quality "stable" for server
[09:54:55.236] Install and start server if needed
[09:54:55.262] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 37735 "192.168.5.173" sh
[09:54:55.264] Generated SSH command: 'type "C:\Users\MSI-NB\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.5.173-257360617.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 37735 "192.168.5.173" sh'
[09:54:55.264] Using connect timeout of 17 seconds
[09:54:55.264] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[09:54:55.513] >
[09:54:55.514] Got some output, clearing connection timeout
[09:54:55.525] >
[09:54:55.545] > 7 87 8
[09:54:55.776] > young@192.168.5.173's password:
[09:54:55.776] Showing password prompt
Note: The garbage line
7 87 8actually contains7followed by ~400 spaces, then87followed by ~400 spaces, then8. Truncated above for readability. These appear to be partial bytes from the bootstrap script leaking into the terminal output before SSH authentication completes.
Expected Behavior
The connection should proceed normally after entering the password in the dialog, without any garbage characters appearing in the terminal output.
Actual Behavior
Before the password prompt, garbage characters (7...87...8 with ~400 spaces between them) appear in the terminal output. With showLoginTerminal=false, the password dialog fails to work properly. With showLoginTerminal=true, manual password entry works fine.
Steps To Reproduce
- Windows 10/11, VS Code 1.115.0, Remote-SSH 0.122.0
- SSH client: OpenSSH_for_Windows_10.0p2 (also reproduced with 8.1p1)
- Remote host: Linux (Ubuntu) with password authentication (no SSH key)
- remote.SSH.showLoginTerminal = false (default)
- Connect via Remote-SSH — garbage chars appear before password prompt, connection fails
Anything else?
Workaround: "remote.SSH.showLoginTerminal": true
Tried without success:
- Upgraded SSH client from 8.1p1 to 10.0p2
- Set
remote.SSH.enableDynamicForwardingtofalse - Verified remote shell configs have no unexpected output
- Remote
~/.bashrchas non-interactive guard - No
~/.bash_profile,~/.ssh/rc, or/etc/ssh/sshrcpresent
The garbage output appears to come from the type script.sh | ssh ... sh pipe — partial bytes of the bootstrap script are rendered in the terminal before SSH authentication completes.
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 with the Remote-SSH connection flow that runs type script.sh | ssh ... sh on Windows and processes output before authentication. Reproduce with remote.SSH.showLoginTerminal set to false, using the logged OpenSSH versions and password-authenticated Ubuntu host. Done means the garbage line no longer disrupts password-prompt detection and the connection proceeds normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu, vscode
- Domain
- authentication, developer-experience, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100