microsoft / microsoft/vscode-remote-release

Remote-SSH is not waiting long enough for the checking ssh command.

Open
#11,470 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ssh
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.useLocalServer setting
  • 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 did not try step 2 of the troubleshooting steps

Remote-SSH Log
Remote-SSH Log

[19:12:29.862] Checking ssh with "C:\WINDOWS\OpenSSH\ssh.exe -V"
[19:12:29.862] > OpenSSH_8.3p1, OpenSSL 1.1.1g 21 Apr 2020
[19:12:35.143] ssh is not exiting, continuing
[19:12:35.143] The path specified "C:\WINDOWS\OpenSSH\ssh.exe" is not a valid ssh binary
[19:12:35.144] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe -V"

Expected Behavior

ssh command doesn't wait long enough and gets killed prior to returning

Actual Behavior

SSH command is killed and VSCode then loops through common ssh locations.

When it hits another valid SSH command it kills those also because the grace period isn't configurable.

Steps To Reproduce

Have very low cpu resources or put a delay on your ssh command.

Anything else?

Can we add a setting to control the grace period for the "Checking SSH" function. This setting could be applied only if the remote.ssh.path is set.

I work on a VDI with very low resources and connect to a server that we actually develop on. When VSCode opens the CPU spikes to 100% which can cause the ssh -V command to take anywhere between 200ms to 11 seconds to return making this an intermittent bug.

Adding a grace period setting would fix this bug.

https://github.com/microsoft/vscode-remote-release/issues/3731

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Remote-SSH: Show Log output and the “Checking ssh” step, comparing the observed timeout with the reported 200 ms to 11 second range. Done means the checking command can wait through the requested grace period without being killed prematurely, while the SSH path fallback still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.