microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.77k stars 29.11k forks source link

Remote SSH error #211798

Closed Rads2512 closed 4 months ago

Rads2512 commented 5 months ago

Does this issue occur when all extensions are disabled?: Yes/No

I have been using VSC for quite a while and I never faced this problem until a few days ago. While connecting to remote ssh, I'm prompted to 2FA and then it gives me this error - "Setting up SSH Host niagara.computecanada.ca: Copying VS Code Server to host with scp" and never opens

If I do ssh through terminal, I can successfully log in.

vscodenpa commented 5 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

Rads2512 commented 5 months ago

I have been using the latest version like I mentioned above - VS Code Version: 1.88. 1

roblourens commented 5 months ago

Please share the full log from the Remote-SSH output channel

Rads2512 commented 5 months ago

It got resolved. Seems like my $HOME was full and it's somehow linked to that and it worked after I freed up disk space. Thanks!

Chao86 commented 3 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

I have met the same problem, my vscode version is as follow: image

Log:

''''[10:58:14.210]` Log Level: 2 [10:58:14.220] SSH Resolver called for "ssh-remote+120", attempt 1 [10:58:14.220] "remote.SSH.useLocalServer": false [10:58:14.220] "remote.SSH.useExecServer": true [10:58:14.220] "remote.SSH.showLoginTerminal": false [10:58:14.220] "remote.SSH.remotePlatform": {"35":"linux","120":"linux","121":"linux","129":"linux"} [10:58:14.221] "remote.SSH.path": undefined [10:58:14.221] "remote.SSH.configFile": undefined [10:58:14.221] "remote.SSH.useFlock": true [10:58:14.221] "remote.SSH.lockfilesInTmp": false [10:58:14.221] "remote.SSH.localServerDownload": auto [10:58:14.221] "remote.SSH.remoteServerListenOnSocket": false [10:58:14.221] "remote.SSH.showLoginTerminal": false [10:58:14.224] "remote.SSH.defaultExtensions": [] [10:58:14.224] "remote.SSH.loglevel": 2 [10:58:14.224] "remote.SSH.enableDynamicForwarding": true [10:58:14.224] "remote.SSH.enableRemoteCommand": false [10:58:14.224] "remote.SSH.serverPickPortsFromRange": {} [10:58:14.224] "remote.SSH.serverInstallPath": {} [10:58:14.232] SSH Resolver called for host: 120 [10:58:14.232] Setting up SSH remote "120" [10:58:14.236] VS Code version: 1.90.2 [10:58:14.236] Remote-SSH version: remote-ssh@0.112.0 [10:58:14.236] win32 x64 [10:58:14.237] Using commit id "5437499feb04f7a586f677b155b039bc2b3669eb" and quality "stable" for server [10:58:14.239] Install and start server if needed [10:58:14.243] Checking ssh with "C:\app\blj_admin\product\11.2.0\client_1\bin\ssh.exe -V" [10:58:14.246] Got error from ssh: spawn C:\app\blj_admin\product\11.2.0\client_1\bin\ssh.exe ENOENT [10:58:14.246] Checking ssh with "C:\Windows\system32\ssh.exe -V" [10:58:14.247] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [10:58:14.247] Checking ssh with "C:\Windows\ssh.exe -V" [10:58:14.248] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [10:58:14.248] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [10:58:14.250] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [10:58:14.250] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [10:58:14.252] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [10:58:14.252] Checking ssh with "C:\Program Files\Java\jre1.8.0_201\bin\ssh.exe -V" [10:58:14.253] Got error from ssh: spawn C:\Program Files\Java\jre1.8.0_201\bin\ssh.exe ENOENT [10:58:14.253] Checking ssh with "C:\Program Files\Git\cmd\ssh.exe -V" [10:58:14.254] Got error from ssh: spawn C:\Program Files\Git\cmd\ssh.exe ENOENT [10:58:14.255] Checking ssh with "C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\ssh.exe -V" [10:58:14.256] Got error from ssh: spawn C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\ssh.exe ENOENT [10:58:14.256] Checking ssh with "C:\Program Files\Microsoft VS Code\bin\ssh.exe -V" [10:58:14.257] Got error from ssh: spawn C:\Program Files\Microsoft VS Code\bin\ssh.exe ENOENT [10:58:14.258] Checking ssh with "C:\Users\heng.cao\AppData\Local\Microsoft\WindowsApps\ssh.exe -V" [10:58:14.259] Got error from ssh: spawn C:\Users\heng.cao\AppData\Local\Microsoft\WindowsApps\ssh.exe ENOENT [10:58:14.260] Checking ssh with "C:\Users\heng.cao\AppData\Local\Programs\Microsoft VS Code\bin\ssh.exe -V" [10:58:14.262] Got error from ssh: spawn C:\Users\heng.cao\AppData\Local\Programs\Microsoft VS Code\bin\ssh.exe ENOENT [10:58:14.262] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [10:58:14.264] Got error from ssh: spawn C:\Windows\System32\OpenSSH\ssh.exe ENOENT [10:58:14.264] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V" [10:58:14.320] > OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021

[10:58:14.326] Running script with connection command: "C:\Program Files\Git\usr\bin\ssh.exe" -T -D 56788 120 bash [10:58:14.330] Terminal shell path: C:\Windows\System32\cmd.exe [10:58:14.656] > [10:58:14.657] Got some output, clearing connection timeout [10:58:14.712] > heng_cao@10.6.208.120's password: [10:58:14.713] Showing password prompt [10:58:23.295] Got password response [10:58:23.296] "install" wrote data to terminal: "**" [10:58:23.322] >

[10:58:23.643] > 641994a4f94c: running

[10:58:23.693] > Installing to /home/heng_cao/.vscode-server...

[10:58:23.731] > 641994a4f94c%%1%% Downloading with wget

[10:58:23.854] > wget download failed wget: /usr/local/ssl/lib/libcrypto.so.1.0.0: no version information available (r equired by wget) wget: /usr/local/ssl/lib/libssl.so.1.0.0: no version informatio n available (required by wget) wget: /usr/local/ssl/lib/libssl.so.1.0.0: no vers ion information available (required by wget) ERROR: cannot verify update.code.vi sualstudio.com's certificate, issued by ‘CN=Microsoft Azure RSA TLS Issuing CA 03,O=Microsoft Corporation,C=US’: Self-signed certificate encountered. To conne ct to update.code.visualstudio.com insecurely, use `--no-check-certificate'. printenv:

[10:58:23.889] > LC_PAPER=zh_CN.UTF-8 XDG_SESSION_ID=1584 LC_ADDRESS=zh_CN.UTF-8 LC_MONETARY=zh_CN.UTF-8 SHELL=/bin/bash SSH_CLIENT=10.6.200.3 56794 22 LC_NUMERIC=zh_CN.UTF-8 USER=heng_cao LC_TELEPHONE=zh_CN.UTF-8 VSCODE_AGENT_FOLDER=/home/heng_cao/.vscode-server PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games :/usr/local/games:/snap/bin MAIL=/var/mail/heng_cao LC_IDENTIFICATION=zh_CN.UTF-8 PWD=/home/heng_cao/.vscode-server LANG=en_US.UTF-8 LC_MEASUREMENT=zh_CN.UTF-8 HOME=/home/heng_cao SHLVL=2 LOGNAME=heng_cao SSH_CONNECTION=10.6.200.3 56794 10.6.208.120 22 XDG_RUNTIME_DIR=/run/user/1013 LC_TIME=zh_CN.UTF-8 LC_NAME=zh_CN.UTF-8 OLDPWD=/home/hengcao =/usr/bin/printenv Trigger local server download 641994a4f94c:trigger_server_download artifact==cli-alpine-x64== destFolder==/home/heng_cao/.vscode-server== destFolder2==/vscode-cli-5437499feb04f7a586f677b155b039bc2b3669eb.tar.gz== 641994a4f94c:trigger_server_download_end Waiting for client to transfer server archive... Waiting for /home/heng_cao/.vscode-server/vscode-cli-5437499feb04f7a586f677b155b 039bc2b3669eb.tar.gz.done and vscode-server.tar.gz to exist

[10:58:23.890] Got request to download on client for {"artifact":"cli-alpine-x64","destPath":"/home/heng_cao/.vscode-server/vscode-cli-5437499feb04f7a586f677b155b039bc2b3669eb.tar.gz"} [10:58:23.890] Downloading VS Code server locally... [10:58:24.277] Downloaded VS Code server to c:\Users\heng.cao\AppData\Local\Temp\764\e235535b-a2db-4af4-b6ca-24714135457c [10:58:24.280] Renamed VS Code server to c:\Users\heng.cao\AppData\Local\Temp\764\vscode_server_1719889104277\vscode-cli-5437499feb04f7a586f677b155b039bc2b3669eb.tar.gz [10:58:24.285] Checking ssh with "C:\app\blj_admin\product\11.2.0\client_1\bin\ssh.exe -V" [10:58:24.287] Got error from ssh: spawn C:\app\blj_admin\product\11.2.0\client_1\bin\ssh.exe ENOENT [10:58:24.287] Checking ssh with "C:\Windows\system32\ssh.exe -V" [10:58:24.289] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [10:58:24.289] Checking ssh with "C:\Windows\ssh.exe -V" [10:58:24.290] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [10:58:24.291] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [10:58:24.292] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [10:58:24.292] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [10:58:24.294] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [10:58:24.294] Checking ssh with "C:\Program Files\Java\jre1.8.0_201\bin\ssh.exe -V" [10:58:24.296] Got error from ssh: spawn C:\Program Files\Java\jre1.8.0_201\bin\ssh.exe ENOENT [10:58:24.296] Checking ssh with "C:\Program Files\Git\cmd\ssh.exe -V" [10:58:24.298] Got error from ssh: spawn C:\Program Files\Git\cmd\ssh.exe ENOENT [10:58:24.298] Checking ssh with "C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\ssh.exe -V" [10:58:24.299] Got error from ssh: spawn C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\ssh.exe ENOENT [10:58:24.299] Checking ssh with "C:\Program Files\Microsoft VS Code\bin\ssh.exe -V" [10:58:24.301] Got error from ssh: spawn C:\Program Files\Microsoft VS Code\bin\ssh.exe ENOENT [10:58:24.302] Checking ssh with "C:\Users\heng.cao\AppData\Local\Microsoft\WindowsApps\ssh.exe -V" [10:58:24.304] Got error from ssh: spawn C:\Users\heng.cao\AppData\Local\Microsoft\WindowsApps\ssh.exe ENOENT [10:58:24.304] Checking ssh with "C:\Users\heng.cao\AppData\Local\Programs\Microsoft VS Code\bin\ssh.exe -V" [10:58:24.306] Got error from ssh: spawn C:\Users\heng.cao\AppData\Local\Programs\Microsoft VS Code\bin\ssh.exe ENOENT [10:58:24.306] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [10:58:24.308] Got error from ssh: spawn C:\Windows\System32\OpenSSH\ssh.exe ENOENT [10:58:24.308] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V" [10:58:24.370] > OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021

[10:58:24.372] Expecting scp to be next to ssh at C:\Program Files\Git\usr\bin\scp.exe [10:58:24.372] Testing scp with "C:\Program Files\Git\usr\bin\scp.exe" [10:58:24.421] scp exited with code: 1 [10:58:24.421] Got stderr from scp: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] source ... target [10:58:24.422] Copying file to remote with "C:\Program Files\Git\usr\bin\scp.exe" "c:\Users\heng.cao\AppData\Local\Temp\764\vscode_server_1719889104277\vscode-cli-5437499feb04f7a586f677b155b039bc2b3669eb.tar.gz" "vscode-cli-5437499feb04f7a586f677b155b039bc2b3669eb.tar.gz.done" 120:"/home/heng_cao/.vscode-server" [10:58:24.422] Using cwd: file:///c%3A/Users/heng.cao/AppData/Local/Temp/764/vscode_server_1719889104277 [10:58:24.422] Terminal shell path: C:\Windows\System32\cmd.exe [10:58:24.692] > [10:58:24.771] > heng_cao@10.6.208.120's password: [10:58:24.771] Showing password prompt [10:58:26.880] > [10:58:29.885] > [10:58:31.330] Got password response [10:58:31.330] "Copy server to host" wrote data to terminal: "**" [10:58:31.371] >

[10:58:31.620] > c:\Users\heng.cao\AppData\Local\Temp\764\vsco 0% 0 0.0KB/s --:-- ETA [10:58:31.776] > c:\Users\heng.cao\AppData\Local\Temp\764\vsco 100% 8752KB 50.9MB/s 00:00 vscode-cli-5437499feb04f7a586f677b155b039bc2b 100% 9 9.2KB/s 00:00

[10:58:32.071] "Copy server to host" terminal command done [10:58:32.898] > Found flag and server on host 641994a4f94c%%2%% tar --version: tar (GNU tar) 1.28 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason. tar: This does not look like a tar archive

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now ERROR: tar exited with non-0 exit code: 0 Already attempted local download, failing 641994a4f94c: start exitCode==37== listeningOn==== osReleaseId==ubuntu== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/1013== platform==linux== unpackResult==error== didLocalDownload==1== downloadTime==== installTime==7== serverStartTime==== execServerToken==1a1a1aaa-111a-1a1a-aa1a-a11111111a11== 641994a4f94c: end

[10:58:32.899] Received install output: exitCode==37== listeningOn==== osReleaseId==ubuntu== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/1013== platform==linux== unpackResult==error== didLocalDownload==1== downloadTime==== installTime==7== serverStartTime==== execServerToken==1a1a1aaa-111a-1a1a-aa1a-a11111111a11==

[10:58:32.901] Resolver error: Error: Failed to install the VS Code Server at g.ServerInstallError (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:499852) at d (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:493513) at t.handleInstallOutput (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:495331) at t.tryInstall (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:621085) at async c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:580730 at async t.withShowDetailsEvent (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:584036) at async k (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:577649) at async t.resolve (c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:581407) at async c:\Users\heng.cao.vscode\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:848023 [10:58:32.908] ------

[10:58:33.332] "install" terminal command done [10:58:33.332] Install terminal quit with output: [10:58:33.364] Opening exec server for ssh-remote+120 [10:58:33.385] Initizing new exec server for ssh-remote+120 [10:58:33.411] Using commit id "5437499feb04f7a586f677b155b039bc2b3669eb" and quality "stable" for server [10:58:33.415] Install and start server if needed [10:58:33.439] Running script with connection command: "C:\Program Files\Git\usr\bin\ssh.exe" -T -D 56788 120 bash [10:58:33.442] Terminal shell path: C:\Windows\System32\cmd.exe [10:58:33.705] > [10:58:33.705] Got some output, clearing connection timeout'''

Can you offer some useful advice for this issue? As far as i know, this issue would randomly occur after restarting vscode, my colleagues have met the same issue.