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.63k stars 282 forks source link

vscode remote failed when using ProxyCommand #7413

Closed Andrew-M-C closed 1 year ago

Andrew-M-C commented 1 year ago
Version: 1.72.2 (Universal)
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:16:30.254Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No

Steps to Reproduce:

  1. my ~/.ssh/config
Host andrewmc.jump
  User ubuntu
  Port 22
  Hostname xxx.xxx.xxx.xxx
  IdentityFile ~/.ssh/id_rsa

Host andrewmc.tgt
  User ubuntu
  Port 36000
  Hostname yyy.yyy.yyy.yyy
  IdentityFile ~/.ssh/id_rsa
  ProxyJump andrewmc.jump
  # ProxyCommand ssh -q -W %h:%p andrewmc.jump

Additionally, if I comment out line ProxyJump andrewmc.jump and use ProxyCommand ssh -q -W %h:%p andrewmc.jump, the logs are the same.

Additionally No 2, if I open remote to andrewmc.jump, it went well.

Thank you in advance!

3.

Does this issue occur when you try this locally?: Yes/No Does this issue occur when you try this locally and all extensions are disabled?: Yes/No

Here are the error logs:


[20:39:23.487] Log Level: 2
[20:39:23.488] remote-ssh@0.90.1
[20:39:23.488] darwin x64
[20:39:23.493] SSH Resolver called for "ssh-remote+andrewmc.tgt", attempt 1
[20:39:23.494] "remote.SSH.useLocalServer": true
[20:39:23.494] "remote.SSH.path": undefined
[20:39:23.494] "remote.SSH.configFile": undefined
[20:39:23.494] "remote.SSH.useFlock": true
[20:39:23.494] "remote.SSH.lockfilesInTmp": false
[20:39:23.494] "remote.SSH.localServerDownload": auto
[20:39:23.494] "remote.SSH.remoteServerListenOnSocket": false
[20:39:23.495] "remote.SSH.showLoginTerminal": false
[20:39:23.495] "remote.SSH.defaultExtensions": []
[20:39:23.495] "remote.SSH.loglevel": 2
[20:39:23.495] "remote.SSH.enableDynamicForwarding": true
[20:39:23.495] "remote.SSH.enableRemoteCommand": false
[20:39:23.495] "remote.SSH.serverPickPortsFromRange": {}
[20:39:23.495] "remote.SSH.serverInstallPath": {}
[20:39:23.505] SSH Resolver called for host: andrewmc.tgt
[20:39:23.505] Setting up SSH remote "andrewmc.tgt"
[20:39:23.508] Acquiring local install lock: /var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-remote-ssh-9ce512e8-install.lock
[20:39:23.512] Looking for existing server data file at /Users/andrewchang/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9ce512e8-d045a5eda657f4d7b676dedbfa7aab8207f8a075-0.90.1/data.json
[20:39:23.513] Using commit id "d045a5eda657f4d7b676dedbfa7aab8207f8a075" and quality "stable" for server
[20:39:23.516] Install and start server if needed
[20:39:23.520] PATH: /Users/andrewchang/go/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS
[20:39:23.520] Checking ssh with "ssh -V"
[20:39:23.525] > OpenSSH_8.6p1, LibreSSL 3.3.6

[20:39:23.528] askpass server listening on /var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-ssh-askpass-0c2f95deb6ba57c0f018628acc3c1c40822bffe5.sock
[20:39:23.528] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-ssh-askpass-a11356db875d7a9fcab3f28b8471685fb29dd2a4.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","57672","-o","ConnectTimeout=15","andrewmc.tgt"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/andrewchang/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9ce512e8-d045a5eda657f4d7b676dedbfa7aab8207f8a075-0.90.1/data.json"}
[20:39:23.528] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.V3rgbd526Z/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-ssh-askpass-0c2f95deb6ba57c0f018628acc3c1c40822bffe5.sock"}
[20:39:23.529] Spawned 81443
[20:39:23.668] > local-server-1> Spawned ssh, pid=81448
[20:39:23.671] stderr> OpenSSH_8.6p1, LibreSSL 3.3.6
[20:39:23.682] stderr> OpenSSH_8.6p1, LibreSSL 3.3.6
[20:39:23.756] stderr> debug1: Server host key: ssh-ed25519 SHA256:Hs4DkdbjriDtF+1jBAt6IW/em9SCOq+hvrYNQxdAiLQ
[20:39:23.853] stderr> Authenticated to xxx.xxx.xxx.xxx ([xxx.xxx.xxx.xxx]:22).
[20:39:38.676] stderr> Connection timed out during banner exchange
[20:39:38.676] stderr> Connection to UNKNOWN port 65535 timed out
[20:39:38.678] stderr> Killed by signal 1.
[20:39:38.678] > local-server-1> ssh child died, shutting down
[20:39:38.685] Local server exit: 0
[20:39:38.686] Received install output: local-server-1> Spawned ssh, pid=81448
OpenSSH_8.6p1, LibreSSL 3.3.6
OpenSSH_8.6p1, LibreSSL 3.3.6
debug1: Server host key: ssh-ed25519 SHA256:Hs4DkdbjriDtF+1jBAt6IW/em9SCOq+hvrYNQxdAiLQ
Authenticated to xxx.xxx.xxx.xxx ([xxx.xxx.xxx.xxx]:22).
Connection timed out during banner exchange
Connection to UNKNOWN port 65535 timed out
Killed by signal 1.
local-server-1> ssh child died, shutting down

[20:39:38.689] Resolver error: Error: The connection timed out
  at g.Offline (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:585273)
  at /Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:582848
  at t.handleInstallOutput (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:583062)
  at Object.e [as tryInstallWithLocalServer] (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:624373)
  at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async /Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:643506
  at async t.withShowDetailsEvent (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:647224)
  at async /Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:622845
  at async T (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:619351)
  at async t.resolveWithLocalServer (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:622460)
  at async t.resolve (/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:644834)
  at async /Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/extension.js:1:726917
[20:39:38.698] ------

[20:39:38.798] ------

[20:39:38.798] SSH Resolver called for "ssh-remote+andrewmc.tgt", attempt 2, (Reconnection)
[20:39:38.801] SSH Resolver called for host: andrewmc.tgt
[20:39:38.801] Setting up SSH remote "andrewmc.tgt"
[20:39:38.802] Acquiring local install lock: /var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-remote-ssh-9ce512e8-install.lock
[20:39:38.804] Looking for existing server data file at /Users/andrewchang/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9ce512e8-d045a5eda657f4d7b676dedbfa7aab8207f8a075-0.90.1/data.json
[20:39:38.805] Using commit id "d045a5eda657f4d7b676dedbfa7aab8207f8a075" and quality "stable" for server
[20:39:38.809] Install and start server if needed
[20:39:38.813] askpass server listening on /var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-ssh-askpass-9991b75cbc6cf36e443d1d1ef3b7d6490ba8aeb6.sock
[20:39:38.813] Spawning local server with {"serverId":2,"ipcHandlePath":"/var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-ssh-askpass-53c5984f7a9cfbc77493a3c20103fc254a7c5735.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","57682","-o","ConnectTimeout=15","andrewmc.tgt"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/andrewchang/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9ce512e8-d045a5eda657f4d7b676dedbfa7aab8207f8a075-0.90.1/data.json"}
[20:39:38.814] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.V3rgbd526Z/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/andrewchang/.vscode/extensions/ms-vscode-remote.remote-ssh-0.90.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/2k/w5gqbn4x18q_yn3y9cyvh1xw0000gn/T/vscode-ssh-askpass-9991b75cbc6cf36e443d1d1ef3b7d6490ba8aeb6.sock"}
[20:39:38.815] Spawned 81452
[20:39:38.976] > local-server-2> Spawned ssh, pid=81457
[20:39:38.980] stderr> OpenSSH_8.6p1, LibreSSL 3.3.6
[20:39:38.992] stderr> OpenSSH_8.6p1, LibreSSL 3.3.6
[20:39:39.062] stderr> debug1: Server host key: ssh-ed25519 SHA256:Hs4DkdbjriDtF+1jBAt6IW/em9SCOq+hvrYNQxdAiLQ
[20:39:39.147] stderr> Authenticated to xxx.xxx.xxx.xxx ([xxx.xxx.xxx.xxx]:22).
eleanorjboyd commented 1 year ago

Hi! Does this issue occur when you try this locally? The Connection timed out during banner exchange suggests a network issue which might be unrelated to the ProxyCommand so I wanted to confirm. Thanks!

Andrew-M-C commented 1 year ago

@eleanorjboyd

I tried again. You are right! Thank you very much! I guess it was the GFW issue.

eleanorjboyd commented 1 year ago

Glad I could help!! Happy coding! 🎉