Skip to content

Feature Request: Make Remote-SSH server start timeout configurable on Windows #11578

@jb92

Description

@jb92

Feature Request

Type: Feature Request
Extension: Remote - SSH
VS Code version: 1.113.0
Remote-SSH version: 0.122.0
OS: Windows Server (SSH target)

Problem

Remote-SSH appears to use a ~4-second timeout when checking
whether the VS Code Server has started on a Windows host. In enterprise
environments running endpoint-protection agents such as CylancePROTECT,
the first execution of node.exe is delayed by ~5 seconds while the AV
engine scans the binary. This causes the first SSH connection to
fail consistently, even though:

  1. The server files are fully pre-deployed — logs confirm
    "Found installed server" (no download or extraction occurs).
  2. The second attempt always succeeds because node.exe is already
    cached by the AV agent and the server process is still running.

The timeout

In both resolver.js and extension.js (v0.122.0), the extension verifies whether a previously-started exec server is still alive using a 3-second Promise.race:

`// out/resolver.js & out/extension.js (minified, reformatted for clarity)
Promise.race([
proxy.call("ping", {}).then(() => true),
new Promise(e => setTimeout(() => e(false), 3_000)) // ← 3 s hardcoded
])

// If the race resolves false:
this.logger.debug(Existing exec server for ${host} timed out);
// → discards the cached server, triggers a full new startup`

Proposal

Add a user-configurable setting, e.g.: c // settings.json "remote.SSH.serverStartTimeout": 10 // seconds (default: 4)

This would let administrators of enterprise-hardened Windows hosts raise
the timeout to accommodate AV first-scan latency without affecting the
default experience for other users.

Expected impact

  • Low risk: only changes a wait duration; no protocol or architectural change.
  • High value for enterprise users: many organizations run mandatory endpoint protection that adds measurable first-exec latency, and getting AV exclusions approved can take weeks or months.

Steps to reproduce the first-connection failure

  1. Provision a Windows Server VM with OpenSSH and an enterprise AV
    agent (e.g., CylancePROTECT).
  2. Pre-deploy the VS Code Server to
    ~/.vscode-server/bin/<commit>/ so no download is needed.
  3. Connect via Remote-SSH from a client.
  4. First attempt fails — server did not report ready within the
    timeout window.
  5. Second attempt succeedsnode.exe is now cached by the AV
    agent.

Metadata

Metadata

Assignees

Labels

sshIssue in vscode-remote SSH

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions