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]: Ask for a password when executing a cell in the Jupyter Notebook, and once entered, the SSH connection terminates. #9119

Closed
2 of 3 tasks
tsitong opened this issue Oct 20, 2023 · 2 comments
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@tsitong
Copy link

tsitong commented Oct 20, 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

Doesn't ask me to enter my password twice.

Steps To Reproduce

  1. Connect using the Remote SSH Extension.
  2. Open the Jupyter Notebook file.
  3. It's fine for me to execute code in the terminal. However, when I try to execute a cell in the Jupyter notebook, it asks for a password again, and the connection closes after entering the correct password. In the past week, no password is required after executing a cell.

Remote-SSH Log

Remote-SSH Log

[00:16:21.419] SSH Resolver called for "ssh-remote+<service_alias>", attempt 2, (Reconnection)
[00:16:21.420] SSH Resolver called for host: <service_alias>
[00:16:21.420] Setting up SSH remote "<service_alias>"
[00:16:21.422] Acquiring local install lock: /var/folders/my/dt8fj61j4d7bfyw163m9mpkh0000gn/T/vscode-remote-ssh-50551d92-install.lock
[00:16:21.423] Looking for existing server data file at /Users/<user_name>/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-50551d92-f1b07bd25dfad64b0167beb15359ae573aecd2cc-0.106.5-tr/data.json
[00:16:21.424] Found local server running: {"remoteListeningOn":{"port":33681},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","connectionToken":"aa1a1a11-1aa1-11aa-aaa1-11a1aa11111a","pid":4441,"ipcHandlePath":"/var/folders/my/dt8fj61j4d7bfyw163m9mpkh0000gn/T/vscode-ssh-askpass-5bf60cf648c5ea048032f25690b27a8a085ae0e6.sock","socksPort":51719,"startupTime":1697818027114}
[00:16:21.424] Running server is stale. Ignoring
[00:16:21.425] Using commit id "f1b07bd25dfad64b0167beb15359ae573aecd2cc" and quality "stable" for server
[00:16:21.427] Install and start server if needed
[00:16:21.430] askpass server listening on /var/folders/my/dt8fj61j4d7bfyw163m9mpkh0000gn/T/vscode-ssh-askpass-c8dfa284a60bb34b399d95ebfcb900ccb2088931.sock
[00:16:21.430] Spawning local server with {"serverId":2,"ipcHandlePath":"/var/folders/my/dt8fj61j4d7bfyw163m9mpkh0000gn/T/vscode-ssh-askpass-b40b4d199ec1798a9be1425b45954fdbbde5a271.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","51719","-o","ConnectTimeout=15","<service_alias>"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/<user_name>/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-50551d92-f1b07bd25dfad64b0167beb15359ae573aecd2cc-0.106.5-tr/data.json"}
[00:16:21.430] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.59Y2SUrIlC/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/<user_name>/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.5/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/<user_name>/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.5/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/my/dt8fj61j4d7bfyw163m9mpkh0000gn/T/vscode-ssh-askpass-c8dfa284a60bb34b399d95ebfcb900ccb2088931.sock"}
[00:16:21.431] Spawned 4526
[00:16:21.470] Failed to set up socket for dynamic port forward to remote port 33681: Socket closed. Is the remote port correct?
[00:16:21.532] > local-server-2> Running ssh connection command: "-v -T -D 51719 -o ConnectTimeout=15 <service_alias>"
[00:16:21.536] > local-server-2> Spawned ssh, pid=4531
[00:16:21.546] stderr> OpenSSH_9.3p2, LibreSSL 3.3.6
[00:16:21.741] stderr> debug1: Server host key: ssh-ed25519 SHA256:Jfb/TUke9RDjhCYA5KLkCutG1mXZg9WrreStWwSiYpk
[00:16:22.008] > local-server-1> ssh child died, shutting down
[00:16:22.017] Local server exit: 0
[00:16:22.018] Got askpass request: {"request":"<user_name>@58.49.150.188's password:"}
[00:16:22.018] Showing password prompt
[00:16:22.019] Listening for interwindow password on /var/folders/my/dt8fj61j4d7bfyw163m9mpkh0000gn/T/vscode-ssh-askpass-98dada50df7210c3e1d39da41c635d6409c53275.sock
[00:16:22.019] Writing password prompt to globalState

Anything else?

No response

@tsitong tsitong added the ssh Issue in vscode-remote SSH label Oct 20, 2023
@roblourens
Copy link
Member

This sounds like microsoft/pylance-release#4983

@tsitong
Copy link
Author

tsitong commented Oct 21, 2023

Thank you @roblourens for sharing the link. Upgrading Pylance to version 2023.10.41 fixed this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 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

3 participants