SSH via terminal working, but not in VSCode
Is there an existing issue for this bug?
- [x] I have searched the existing open issues and found none that apply.
- [x] 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
- [x] I have read and performed the troubleshooting steps
- [x] I have tried both values of the
remote.SSH.useLocalServersetting - [x] My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- [x] 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
[13:45:30.471] Log Level: 2
[13:45:30.499] SSH Resolver called for "ssh-remote+zllambda-gpu1.csez.zohocorpin.com", attempt 1
[13:45:30.502] remote.SSH.useLocalServer = true
[13:45:30.502] remote.SSH.useExecServer = true
[13:45:30.503] remote.SSH.bindHost = {}
[13:45:30.503] remote.SSH.path = undefined
[13:45:30.503] remote.SSH.configFile = undefined
[13:45:30.503] remote.SSH.useFlock = true
[13:45:30.503] remote.SSH.lockfilesInTmp = false
[13:45:30.503] remote.SSH.localServerDownload = auto
[13:45:30.503] remote.SSH.remoteServerListenOnSocket = false
[13:45:30.503] remote.SSH.defaultExtensions = []
[13:45:30.504] remote.SSH.defaultExtensionsIfInstalledLocally = []
[13:45:30.504] remote.SSH.loglevel = 2
[13:45:30.504] remote.SSH.enableDynamicForwarding = true
[13:45:30.504] remote.SSH.enableRemoteCommand = false
[13:45:30.504] remote.SSH.serverPickPortsFromRange = {}
[13:45:30.504] remote.SSH.serverInstallPath = {}
[13:45:30.504] remote.SSH.permitPtyAllocation = false
[13:45:30.506] remote.SSH.preferredLocalPortRange = undefined
[13:45:30.506] remote.SSH.useCurlAndWgetConfigurationFiles = false
[13:45:30.506] remote.SSH.experimental.chat = false
[13:45:30.506] remote.SSH.experimental.enhancedSessionLogs = false
[13:45:30.506] remote.SSH.httpProxy = {}
[13:45:30.507] remote.SSH.httpsProxy = {}
[13:45:30.516] VS Code version: 1.100.1
[13:45:30.516] Remote-SSH version: [email protected]
[13:45:30.516] linux x64
[13:45:30.520] SSH Resolver called for host: zllambda-gpu1.csez.zohocorpin.com
[13:45:30.520] Setting up SSH remote "zllambda-gpu1.csez.zohocorpin.com"
[13:45:30.526] Acquiring local install lock: /tmp/vscode-remote-ssh-5d0992b3-install.lock
[13:45:30.530] Looking for existing server data file at /home/veera-14082/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5d0992b3-91fa95bccb027ece6a968589bb1d662fa9c8e170-0.120.0-es/data.json
[13:45:30.530] No existing data file
[13:45:30.531] Using commit id "91fa95bccb027ece6a968589bb1d662fa9c8e170" and quality "stable" for server
[13:45:30.531] Extensions to install:
[13:45:30.537] Install and start server if needed
[13:45:30.543] PATH: /home/veera-14082/.poetry/bin:/home/veera-14082/anaconda3/envs/zenv/bin:/home/veera-14082/anaconda3/condabin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/veera-14082/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
[13:45:30.543] Checking ssh with "ssh -V"
[13:45:30.553] > OpenSSH_8.9p1 Ubuntu-3ubuntu0.13, OpenSSL 3.0.2 15 Mar 2022
[13:45:30.556] askpass server listening on /run/user/1001/vscode-ssh-askpass-8bb165b5e679a68eefe0f18d1bb98c6fb5413fb9.sock
[13:45:30.557] Spawning local server with {"serverId":1,"ipcHandlePath":"/run/user/1001/vscode-ssh-askpass-a05e04d7c4e91ea27b69c9742e984dfa37ca6fd4.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","36657","-o","ConnectTimeout=15","zllambda-gpu1.csez.zohocorpin.com"],"serverDataFolderName":".vscode-server","dataFilePath":"/home/veera-14082/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5d0992b3-91fa95bccb027ece6a968589bb1d662fa9c8e170-0.120.0-es/data.json"}
[13:45:30.557] Local server env: {"SSH_AUTH_SOCK":"/run/user/1001/keyring/ssh","SHELL":"/bin/bash","DISPLAY":":0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/veera-14082/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/home/veera-14082/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1001/vscode-ssh-askpass-8bb165b5e679a68eefe0f18d1bb98c6fb5413fb9.sock"}
[13:45:30.561] Spawned 2520020
[13:45:30.562] Using connect timeout of 17 seconds
[13:45:30.646] > local-server-1> Running ssh connection command: ssh -v -T -D 36657 -o ConnectTimeout=15 zllambda-gpu1.csez.zohocorpin.com
[13:45:30.649] > local-server-1> Spawned ssh, pid=2520028
[13:45:30.652] stderr> OpenSSH_8.9p1 Ubuntu-3ubuntu0.13, OpenSSL 3.0.2 15 Mar 2022
[13:45:42.220] stderr> debug1: Server host key: ssh-ed25519 SHA256:Ai52npm2jasAdUxRV0zshg0SJvxeQB8ObaQaSVxkK0E
[13:45:47.564] Terminating local server
[13:45:47.566] Resolver error: Error: Connecting with SSH timed out
at y.Timeout (/home/veera-14082/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/extension.js:2:744895)
at Timeout._onTimeout (/home/veera-14082/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/extension.js:2:805797)
at listOnTimeout (node:internal/timers:581:17)
at process.processTimers (node:internal/timers:519:7)
[13:45:47.571] ------
[13:45:47.571] ---------- [Session Summary] -----------
[13:45:47.571] [Timeout]: Error: Timeout (Connecting with SSH timed out)
[13:45:47.571] ----------------------------------------
[13:45:47.574] Local server exit: 15
Expected Behavior
Connection
Actual Behavior
Not connected
Steps To Reproduce
Connection
Anything else?
No response
I got the same problem. Failed to connect to ubuntu server from Mac.
Also getting similar to this. SSH_AUTH_SOCK is not set or being forwarded properly now for some reason.
cmd.exe ssh-add -L is fine, but in dev container it "Could not open a connection to your authentication agent." or
error: Load key "[redacted]/.git_signing_key_tmpC5KwFc": invalid format?
fatal: failed to write commit object
Are either of you on VSCode Insiders? VSCode stable is working for me but not insiders for SSH & Forwarding to Dev Container.
Im also having issues with the SSH_AUTH_SOCK not being set after updating vscode.
Issue particularly is showing up with git commands (pull, push), but in a local terminal they work successfully.