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)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- powershell, vscode
- Domain
- networking
Research direction
Reproduce the issue with the listed VS Code Remote-SSH steps, comparing affected and unaffected sshd versions and the plain ssh user@host case. Review install-sshd.ps1 and the displayed code-server-insiders.cmd launch command while checking how the server process is presented. Done means VS Code stays connected without a visible server-side cmd.exe window.
Written by the indexing model from the issue text.
Description
Prerequisites
- Write a descriptive title.
- 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 window
Another 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>
Version
v7.9.0.0
Visuals
No response
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 820
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from PowerShell/Win32-OpenSSH
-
Area-ssh-agent Issue-Upstream Parity
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PowerShell/Win32-OpenSSH#2458 · 1 reaction ·
-
Area-Authentication Area-Logging/Diagnostics Area-sshd Investigate Issue-Bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PowerShell/Win32-OpenSSH#2466 · 1 comment · 1 reaction ·
-
Area-ssh-agent Issue-Enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
PowerShell/Win32-OpenSSH#2462 · 1 comment · 1 reaction ·
-
Area-ssh-agent Investigate
Difficulty 5/5 Over a week Newbie friendliness 25/100
PowerShell/Win32-OpenSSH#2460 · 1 reaction ·
-
User-defined environment variables referenced in the user PATH are not expanded in SSH sessionsOpenArea-sshd Investigate
Difficulty 4/5 3-5 days Newbie friendliness 68/100
PowerShell/Win32-OpenSSH#2456 · 1 reaction ·
All issues in PowerShell/Win32-OpenSSH
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
SagerNet/sing-openvpn#11 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
EchoTools/nevr-runtime#116 ·
Maintainers usually reply within 1 day
-
[network-protocol] FS directory listing is truncated after 512 bytes when using Atari NOSPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
FujiNetWIFI/fujinet-firmware#1834 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
agentic-community/mcp-gateway-registry#1849 ·
Maintainers usually reply within 1 day
-
There are a few redundant calls to `fdesc._setCloseOnExec()`Possibly taken @gudnimg claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day