microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 291 forks source link

Remote SSH not working with v1.65.2 in Windows 10 #6496

Closed sidharthkothari closed 2 years ago

sidharthkothari commented 2 years ago

Issue Type: Bug

Steps to Reproduce:

  1. Upgrade to 1.65.2 version and remote ssh fails

Actual Result:

[20:11:52.921] Log Level: 2
[20:11:52.923] remote-ssh@0.77.2022031115
[20:11:52.923] win32 x64
[20:11:52.927] SSH Resolver called for "ssh-remote+65.1.255.246", attempt 1
[20:11:52.928] "remote.SSH.useLocalServer": false
[20:11:52.928] "remote.SSH.showLoginTerminal": false
[20:11:52.928] "remote.SSH.remotePlatform": {"34.226.103.91":"linux","dataconnectors":"linux"}
[20:11:52.928] "remote.SSH.path": undefined
[20:11:52.929] "remote.SSH.configFile": C:\Users\sidharth\.ssh\ec2_config
[20:11:52.929] "remote.SSH.useFlock": true
[20:11:52.929] "remote.SSH.lockfilesInTmp": false
[20:11:52.929] "remote.SSH.localServerDownload": auto
[20:11:52.929] "remote.SSH.remoteServerListenOnSocket": false
[20:11:52.929] "remote.SSH.showLoginTerminal": false
[20:11:52.929] "remote.SSH.defaultExtensions": []
[20:11:52.930] "remote.SSH.loglevel": 2
[20:11:52.930] "remote.SSH.enableDynamicForwarding": true
[20:11:52.930] "remote.SSH.enableRemoteCommand": false
[20:11:52.930] "remote.SSH.serverPickPortsFromRange": {}
[20:11:52.930] "remote.SSH.serverInstallPath": {}
[20:11:52.963] SSH Resolver called for host: 65.1.255.246
[20:11:52.963] Setting up SSH remote "65.1.255.246"
[20:11:52.991] Using commit id "c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1" and quality "stable" for server
[20:11:52.995] Install and start server if needed
[20:12:35.883] Checking ssh with "ssh -V"
[20:12:36.079] > OpenSSH_for_Windows_8.1p
[20:12:36.080] > 1, LibreSSL 3.0.2
[20:12:36.084] > 

[20:12:36.100] Using SSH config file "C:\Users\sidharth\.ssh\ec2_config"
[20:12:36.101] Running script with connection command: ssh -T -D 50900 -F "C:\Users\sidharth\.ssh\ec2_config" "65.1.255.246" bash
[20:12:36.107] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[20:12:53.109] Resolver error: Error: Connecting with SSH timed out
    at Function.Timeout (c:\Users\sidharth\.vscode\extensions\ms-vscode-remote.remote-ssh-0.77.2022031115\out\extension.js:1:586167)
    at Timeout._onTimeout (c:\Users\sidharth\.vscode\extensions\ms-vscode-remote.remote-ssh-0.77.2022031115\out\extension.js:1:680552)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
[20:12:53.124] ------

Expected Output: Successful Remote Connection

Tried Deleting the "vscode-remote-lock.ubuntu.c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1" as mentioned in Issue #6458 but did not work. The file gets reproduced with every try.

Also tried moving to pre release version of remote ssh extension and add --accept-server-license-terms to server.sh as mentioned in Isssue #6328 but nothing seems to work.

Extension version: 0.77.2022031115 VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:55.248Z) OS version: Windows_NT x64 6.0.6000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)| |GPU Status|2d_canvas: unavailable_software
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software| |Load (avg)|undefined| |Memory (System)|7.79GB (3.37GB free)| |Process Argv|--crash-reporter-id d5ac9fa0-296d-47a8-8a80-1465a6dd0c96| |Screen Reader|no| |VM|40%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392:30443607 pythontb:30283811 pythonvspyt551:30345470 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vsclayoutctrt:30451275 dsvsc009:30452663 pythonvsnew555:30457759 vscscmwlcmt:30438805 vscgsvidc:30447482 pynewfile477:30450038 ```
tanhakabir commented 2 years ago

Are you able to run echo "echo hello" | ssh 65.1.255.246? It looks like SSH on your machine wasn't able to resolve the host.

sidharthkothari commented 2 years ago

Are you able to run echo "echo hello" | ssh 65.1.255.246? It looks like SSH on your machine wasn't able to resolve the host.

Yes I am able to run it. Here is the output:

 echo "echo hello" | ssh 65.1.255.246
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-1018-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Mar 24 19:44:57 UTC 2022

  System load:           0.0
  Usage of /:            18.3% of 77.49GB
  Memory usage:          20%
  Swap usage:            6%
  Processes:             163
  Users logged in:       0
  IPv4 address for eth0: {removed}
  IPv6 address for eth0: {removed}

 * Ubuntu Pro delivers the most comprehensive open source security and
   compliance features.

   https://ubuntu.com/aws/pro

144 updates can be installed immediately.
8 of these updates are security updates.
To see these additional updates run: apt list --upgradable

3 updates could not be installed automatically. For more details,
see /var/log/unattended-upgrades/unattended-upgrades.log

*** System restart required ***
hello
sidharthkothari commented 2 years ago

I finally solved the problem with this version. I was having a lot of issues with SSH and also the terminal was not loading. I uninstalled all the VS Code Files from AppData as well as /user/.vscode. After installing everything back again the problem persisited. So I went ahead and looked for possible reasons why Terminal was not loading in VS Code. Finally I tried to uncheck the Run this program in compatibility mode after reading the common issues on Windows from this doc and it worked. https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch

You may close the issue now.