microsoft / microsoft/vscode-remote-release
Intermittent ability to connect with Remote SSH
Nobody has claimed this yet.
- 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.useLocalServersetting - 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
[09:27:52.147] Log Level: 1\n
[09:27:52.169] VS Code version: 1.106.3
[09:27:52.169] Remote-SSH version: remote-ssh@0.120.0
[09:27:52.169] win32 x64
[09:27:52.179] SSH Resolver called for "ssh-remote+RHEL8-Test", attempt 1
[09:27:52.184] remote.SSH.useLocalServer = false
[09:27:52.184] remote.SSH.useExecServer = false
[09:27:52.184] remote.SSH.bindHost = {}
[09:27:52.185] remote.SSH.showLoginTerminal = true
[09:27:52.185] remote.SSH.remotePlatform = {"":"linux","RHEL8-Test":"linux"}
[09:27:52.185] remote.SSH.path = C:\Windows\System32\OpenSSH\ssh.exe
[09:27:52.185] remote.SSH.configFile = C:\temp\config
[09:27:52.185] remote.SSH.useFlock = true
[09:27:52.186] remote.SSH.lockfilesInTmp = true
[09:27:52.186] remote.SSH.localServerDownload = auto
[09:27:52.186] remote.SSH.remoteServerListenOnSocket = false
[09:27:52.186] remote.SSH.defaultExtensions = ["redhat.vscode-yaml"]
[09:27:52.186] remote.SSH.defaultExtensionsIfInstalledLocally = []
[09:27:52.186] remote.SSH.loglevel = 1
[09:27:52.187] remote.SSH.maxReconnectionAttempts = 5
[09:27:52.187] remote.SSH.enableDynamicForwarding = true
[09:27:52.187] remote.SSH.enableRemoteCommand = false
[09:27:52.187] remote.SSH.serverPickPortsFromRange = {}
[09:27:52.187] remote.SSH.serverInstallPath = {}
[09:27:52.187] remote.SSH.permitPtyAllocation = false
[09:27:52.187] remote.SSH.preferredLocalPortRange = undefined
[09:27:52.189] remote.SSH.useCurlAndWgetConfigurationFiles = false
[09:27:52.189] remote.SSH.experimental.chat = false
[09:27:52.189] remote.SSH.experimental.enhancedSessionLogs = true
[09:27:52.189] remote.SSH.httpProxy = {"":""}
[09:27:52.189] remote.SSH.httpsProxy = {"*":""}
[09:27:52.200] Found relevant configuration for host RHEL8-Test in JSON data
[09:27:52.200] SSH Resolver called for host: RHEL8-Test
[09:27:52.200] Setting up SSH remote "RHEL8-Test"
[09:27:52.212] Using commit id "bf9252a2fb45be6893dd8870c0bf37e2e1766d61" and quality "stable" for server
[09:27:52.212] Extensions to install: redhat.vscode-yaml
[09:27:52.222] Install and start server if needed
[09:27:52.225] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[09:27:52.300] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
Expected Behavior
The SSH connection is successful each time it is attempted
Actual Behavior
The SSH connection is only successful the first time it is attempted following a Config file change. Subsequent attempts hang after the OpenSSH line in the output. Deleting the saved server OS information in the Remote-SSH settings or modifying the config file results in the next connection being successful and following connections hanging once more
Steps To Reproduce
-
Environment: AWS Workspace running Windows 2019 connecting to Ansible Controller EC2 instance running RHEL 8
-
Config file:
Host RHEL8-Test
HostName RHEL8-Test
User user -
Hit f1 and select Remote-SSH: Connect to Host...
-
No error, connection never completes
Anything else?
We use a shared H: drive mounts for the user on the Windows and Linux hosts and that is where I put the .vscode-server files. I have the ssh config for Remote SSH and the SSH key on the H: drive as well. I have tried moving the config and SSH keys to the C: drive but nothing improved
Contributor 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.
Research direction
Start with the Remote-SSH: Show Log output and the Remote-SSH troubleshooting wiki, then reproduce the connection using the RHEL8-Test SSH configuration. Compare the first successful attempt with subsequent attempts after the saved server OS information or config file changes, and verify that repeated connections complete without hanging after the OpenSSH version line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, linux, vscode
- Domain
- cloud, devtools, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100