Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Remote-SSH Bug]: SSH connections left open after close until VSCode itself has terminated #8402

Closed
3 tasks done
tomqwpl opened this issue Apr 21, 2023 · 1 comment
Closed
3 tasks done
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@tomqwpl
Copy link

tomqwpl commented Apr 21, 2023

Is there an existing issue for this bug?

  • I have searched the existing issues

Required Troubleshooting Steps

  • I have followed these troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It connects successfully

->

No response

Expected Behavior

I expect that having "closed" the SSH connection, the ssh.exe process is terminated. Perhaps my expectation is incorrect.

Steps To Reproduce

The vscode version I'm using is 1.77.3, on Windows 11.
The same behaviour occurs on the latest Insiders version.

To reproduce:

  1. Start VSCode
  2. Connect to a remote server using SSH
  3. Do this multiple times, so you have multiple VSCode windows open each of which is connected to the same SSH server (doesn't matter that it's the same one, you just need multiple windows each connected to an SSH server). You should also still have the original starting VSCode window.
  4. Using Windows task manager or preferably process explorer (https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer) to find the executables that are running.
  5. Close down all of the "SSH" VSCode windows, leaving the original "local" VSCode window
  6. Note that all of the SSH executables are still running in Process Explorer/Task Manager:
    Screenshot 2023-04-21 141139

The above shot is taken when the only VSCode window open is an empty "local" VSCode window. I had opened, and then closed two "remote ssh" VSCode windows.

Remote-SSH Log

Remote-SSH Log

[14:21:19.930] Log Level: 2
[14:21:19.948] Picking SSH host
[14:21:19.951] VS Code version: 1.77.3
[14:21:19.951] Remote-SSH version: remote-ssh@0.100.0
[14:21:19.952] win32 x64
[14:21:21.432] Selected linux-el8-dev
[14:21:37.828] Picking SSH host
[14:21:38.928] Selected linux-el8-dev

Anything else?

No response

@tomqwpl tomqwpl added the ssh Issue in vscode-remote SSH label Apr 21, 2023
@roblourens
Copy link
Member

roblourens commented Apr 21, 2023

This is #7642. But you should be able to work around it by setting the useLocalServer setting to true

@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

2 participants