You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Visible elevated cmd.exe window appears on server desktop when connecting via VS Code Remote-SSH (v9.5.0.0p1-Beta and v10.0.0.0p2-Preview; not in v7.9.0.0p1-Beta) #2465
Make sure you are able to repro it on the latest version
Search the existing issues.
Steps to reproduce
Steps to reproduce
Install Win32-OpenSSH v10.0.0.0p2-Preview (or v9.5.0.0p1-Beta) on a Windows 10 server via the release zip and install-sshd.ps1.
Log in with an account in the local Administrators group, using key auth.
From another Windows 10 machine, connect using VS Code (Insiders) Remote-SSH.
Look at the server's desktop.
Expected behavior
No console window appears on the server's desktop.
Actual behavior
A window titled "Administrator: c:\windows\system32\cmd.exe" appears, empty except for a cursor. If I close it, VS Code loses its connection, so the window is hosting the VS Code server (code-server-insiders.cmd).
Connecting with plain ssh user@host from a terminal does not cause this; it only happens with VS Code Remote-SSH.
Versions tested (same client, same server, same config)
sshd version
Window appears
v10.0.0.0p2-Preview
Yes
v9.5.0.0p1-Beta
Yes
v7.9.0.0p1-Beta
No
Another Windows server running an older sshd, connected from the same client, also shows no window.
Environment
Server: Windows 10 22H2, build 19045.6456
Client: Windows 10 22H2, build 19045.3803, OpenSSH_for_Windows_8.1p1
VS Code: Insiders <1.140.0-insider (system setup)> Commit: 4a6a3612a562c50f54c2bd5211f0ea42915b974e
Remote - SSH extension
Expected behavior
No console window appears on the server's desktop when a client connects with VS Code Remote-SSH (this is what happens with v7.9.0.0p1-Beta).
Actual behavior
With v10.0.0.0p2-Preview and v9.5.0.0p1-Beta, a window titled "Administrator: c:\windows\system32\cmd.exe" appears on the server's desktop each time VS Code connects. It is empty except for a cursor. Closing it kills the VS Code server and the client reports it cannot connect, so the window is hosting code-server-insiders.cmd.Plain `ssh user@host` from a terminal does not trigger the window. Only VS Code Remote-SSH does.Tested with the same client, same server, same config:- v10.0.0.0p2-Preview: window appears- v9.5.0.0p1-Beta: window appears- v7.9.0.0p1-Beta: no windowAnother Windows server running an older sshd shows no window with the same client.
Error details
No error message. The behavior is the unexpected visible window. Process seen while connected:cmd /Q /C C:\Users\<user>\.vscode-server-insiders\cli\servers\Insiders-<hash>\server\bin\code-server-insiders.cmd --connection-token=remotessh --start-server --enable-remote-auto-shutdown ...
Environment data
Server: Windows 10 22H2, build 19045.6456
Client: Windows 10 22H2, build 19045.3803
Client ssh: OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Server sshd (affected): v10.0.0.0p2-Preview, v9.5.0.0p1-Beta
Server sshd (not affected): v7.9.0.0p1-Beta
Install method: release zip +install-sshd.ps1
Login account: member of local Administrators group, key auth
VS Code: Insiders <1.140.0-insider (system setup)> Commit: 4a6a3612a562c50f54c2bd5211f0ea42915b974e
Remote - SSH extension <Insiders-4a6a3612a562c50f54c2bd5211f0ea42915b974e>
This looks like an actionable Windows-specific regression in how sshd launches/hosts the remote command session for VS Code Remote-SSH.
For maintainers
Windows-specific vs. parity: This belongs in PowerShell/openssh-portable as a Windows-specific bug. The report is about an elevated cmd.exe window appearing on the Windows server desktop when sshd starts VS Code's code-server-insiders.cmd; that points to Windows process/session/console handling rather than general OpenSSH protocol behavior. Confidence: high.
Reproducibility: The report includes affected and unaffected OpenSSH-for-Windows versions, server/client OS builds, install method, auth method, VS Code Remote-SSH context, expected/actual behavior, and a process command line. It should be reproducible from the report as written, though a full sshd debug log would still help if maintainers need to trace process creation. Confidence: high.
Copilot-fix suitability: Maybe. The symptom is well-scoped and regression-bounded, but the fix may require careful Windows process creation/session/console behavior changes in the portable fork.
Likely area:Area-sshd and Area-Terminal; the visible cmd.exe appears on the server desktop from an sshd-launched remote command, likely involving Windows console/window creation for non-PTY or subsystem-like sessions.
Evidence from the report
The reporter tested the same client, server, and config and found:
The visible window hosts code-server-insiders.cmd; closing it breaks the VS Code Remote-SSH connection. Plain ssh user@host does not trigger the same behavior.
Related issue search
I did not find a strict open duplicate with the same root cause. Searches for code-server-insiders.cmd, VS Code Remote-SSH with cmd.exe, visible cmd.exe with sshd, and console window with sshd primarily returned this issue plus unrelated/looser matches such as #2037, #1564, #1487, #1772, and older terminal/console issues.
Activity
github-actions commentedon Sep 28, 2026
This looks like an actionable Windows-specific regression in how
sshdlaunches/hosts the remote command session for VS Code Remote-SSH.For maintainers
cmd.exewindow appearing on the Windows server desktop whensshdstarts VS Code'scode-server-insiders.cmd; that points to Windows process/session/console handling rather than general OpenSSH protocol behavior. Confidence: high.sshddebug log would still help if maintainers need to trace process creation. Confidence: high.Area-sshdandArea-Terminal; the visiblecmd.exeappears on the server desktop from ansshd-launched remote command, likely involving Windows console/window creation for non-PTY or subsystem-like sessions.Evidence from the report
The reporter tested the same client, server, and config and found:
cmd.exewindow appearscmd.exewindow appearsThe visible window hosts
code-server-insiders.cmd; closing it breaks the VS Code Remote-SSH connection. Plainssh user@hostdoes not trigger the same behavior.Related issue search
I did not find a strict open duplicate with the same root cause. Searches for
code-server-insiders.cmd,VS Code Remote-SSHwithcmd.exe, visiblecmd.exewithsshd, andconsole windowwithsshdprimarily returned this issue plus unrelated/looser matches such as #2037, #1564, #1487, #1772, and older terminal/console issues.Add this agentic workflows to your repo
To install this agentic workflow, run