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]: The connection is disconnected immediately after the authentication is successful #8843

Closed
2 of 3 tasks
Ostrichpie818 opened this issue Aug 15, 2023 · 1 comment
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@Ostrichpie818
Copy link

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

No response

Steps To Reproduce

No response

Remote-SSH Log

Remote-SSH Log

[14:14:58.880] Log Level: 2
[14:14:58.892] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a224d4e455432e8b7b3e69dbfe69cba227d", attempt 1
[14:14:58.893] "remote.SSH.useLocalServer": true
[14:14:58.893] "remote.SSH.path": undefined
[14:14:58.893] "remote.SSH.configFile": undefined
[14:14:58.893] "remote.SSH.useFlock": true
[14:14:58.893] "remote.SSH.lockfilesInTmp": false
[14:14:58.893] "remote.SSH.localServerDownload": auto
[14:14:58.894] "remote.SSH.remoteServerListenOnSocket": false
[14:14:58.894] "remote.SSH.showLoginTerminal": true
[14:14:58.894] "remote.SSH.defaultExtensions": []
[14:14:58.894] "remote.SSH.loglevel": 2
[14:14:58.894] "remote.SSH.enableDynamicForwarding": true
[14:14:58.894] "remote.SSH.enableRemoteCommand": false
[14:14:58.894] "remote.SSH.serverPickPortsFromRange": {}
[14:14:58.895] "remote.SSH.serverInstallPath": {}
[14:14:58.899] VS Code version: 1.81.1
[14:14:58.899] Remote-SSH version: remote-ssh@0.102.0
[14:14:58.899] darwin x64
[14:14:58.901] SSH Resolver called for host: MNET2跳板机
[14:14:58.901] Setting up SSH remote "MNET2跳板机"
[14:14:58.905] Acquiring local install lock: /var/folders/p8/z12x4twn3nv17dzbd24xddc40000gn/T/vscode-remote-ssh-beda8b05-install.lock
[14:14:58.906] Looking for existing server data file at /Users/ostrichpie/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-beda8b05-6c3e3dba23e8fadc360aed75ce363ba185c49794-0.102.0/data.json
[14:14:58.907] Using commit id "6c3e3dba23e8fadc360aed75ce363ba185c49794" and quality "stable" for server
[14:14:58.912] Install and start server if needed
[14:14:58.915] PATH: /Users/ostrichpie/anaconda3/bin:/Users/ostrichpie/anaconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
[14:14:58.916] Checking ssh with "ssh -V"
[14:14:58.925] > OpenSSH_9.0p1, LibreSSL 3.3.6

[14:14:58.927] askpass server listening on /var/folders/p8/z12x4twn3nv17dzbd24xddc40000gn/T/vscode-ssh-askpass-588e5a53167d9ca738dd1cfa00208d3634ab21ae.sock
[14:14:58.928] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/p8/z12x4twn3nv17dzbd24xddc40000gn/T/vscode-ssh-askpass-e46860ed88204501641c0eda8c2ec5e504316674.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","55002","-o","ConnectTimeout=30","MNET2跳板机"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/ostrichpie/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-beda8b05-6c3e3dba23e8fadc360aed75ce363ba185c49794-0.102.0/data.json"}
[14:14:58.928] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.zIBfHQf6LM/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/p8/z12x4twn3nv17dzbd24xddc40000gn/T/vscode-ssh-askpass-588e5a53167d9ca738dd1cfa00208d3634ab21ae.sock"}
[14:14:58.929] Spawned 31406
[14:14:59.090] > local-server-1> Running ssh connection command: "-v -T -D 55002 -o ConnectTimeout=30 MNET2跳板机"
[14:14:59.093] > local-server-1> Spawned ssh, pid=31413
[14:14:59.098] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[14:14:59.438] stderr> debug1: Server host key: ssh-rsa SHA256:2jJZ8p3hdQemBUx4okN65it3tybVAQv5HOQjMgbqfpw
[14:14:59.794] Got askpass request: {"request":"(yidacai@wxg.mnet2.com) Pin+Token:"}
[14:14:59.795] Listening for interwindow password on /var/folders/p8/z12x4twn3nv17dzbd24xddc40000gn/T/vscode-ssh-askpass-ebfea001f3496266eab99d0be64deb7abc9c2538.sock
[14:14:59.795] Writing password prompt to globalState
[14:15:05.537] Interactor gave response: ************
[14:15:05.537] Cleaning up other-window auth server
[14:15:05.847] stderr> Authenticated to wxg.mnet2.com ([9.218.239.110]:36000) using "keyboard-interactive".
[14:15:05.971] > authz success
[14:15:06.183] stderr> Transferred: sent 2344, received 2520 bytes, in 0.3 seconds
[14:15:06.183] stderr> Bytes per second: sent 7020.1, received 7547.2
[14:15:06.183] > local-server-1> ssh child died, shutting down
[14:15:06.189] Local server exit: 0
[14:15:06.189] Received install output: local-server-1> Running ssh connection command: "-v -T -D 55002 -o ConnectTimeout=30 MNET2跳板机"
local-server-1> Spawned ssh, pid=31413
OpenSSH_9.0p1, LibreSSL 3.3.6
debug1: Server host key: ssh-rsa SHA256:2jJZ8p3hdQemBUx4okN65it3tybVAQv5HOQjMgbqfpw
Authenticated to wxg.mnet2.com ([9.218.239.110]:36000) using "keyboard-interactive".
authz success
Transferred: sent 2344, received 2520 bytes, in 0.3 seconds
Bytes per second: sent 7020.1, received 7547.2
local-server-1> ssh child died, shutting down

[14:15:06.190] Failed to parse remote port from server output
[14:15:06.193] Resolver error: Error: 
	at m.Create (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:584145)
	at t.handleInstallOutput (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:582705)
	at Object.e [as tryInstallWithLocalServer] (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:623656)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async /Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:643708
	at async t.withShowDetailsEvent (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:647428)
	at async /Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:622128
	at async C (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:618634)
	at async t.resolveWithLocalServer (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:621743)
	at async t.resolve (/Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:645036)
	at async /Users/ostrichpie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.102.0/out/extension.js:1:720916
[14:15:06.199] ------

Anything else?

The problem also occured If I use the command: ssh -v -T -D 55002 -o ConnectTimeout=30 MNET2跳板机 in the zsh,but the command ssh -v -D 55002 -o ConnectTimeout=30 MNET2跳板机 successed.

@Ostrichpie818 Ostrichpie818 added the ssh Issue in vscode-remote SSH label Aug 15, 2023
@roblourens
Copy link
Member

Thanks for figuring that out #6078

@microsoft microsoft locked and limited conversation to collaborators Jan 27, 2024
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