14

This just started happening today after I upgraded VSCode. It connects fine to one of my AWS machines, but not to one that had been working fine for a while. It's not related to my ssh keys, because even if I remove it, it still ends up with the same outcome.

Here is what I get in the output log when trying to remote-ssh:

[15:00:18.550] Running script with connection command: ssh -T -D 57103 "DEV" bash
[15:00:18.552] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[15:00:18.744] > key_load_public: invalid format
> ]0;C:\WINDOWS\System32\cmd.exe
[15:00:18.745] Got some output, clearing connection timeout
[15:00:19.441] > warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
[15:00:20.673] > 1b2d18264e08: running
[15:00:20.707] > Acquiring lock on /home/ubuntu/.vscode-server/bin/3c4e3df9e89829dce27b7b5c245083
> 06b151f30d/vscode-remote-lock.ubuntu.3c4e3df9e89829dce27b7b5c24508306b151f30d   
[15:00:20.723] > Found existing installation at /home/ubuntu/.vscode-server/bin/3c4e3df9e89829dce
> 27b7b5c24508306b151f30d...
> Checking /home/ubuntu/.vscode-server/.3c4e3df9e89829dce27b7b5c24508306b151f30d.l
> og and /home/ubuntu/.vscode-server/.3c4e3df9e89829dce27b7b5c24508306b151f30d.pid
>  for a running server
[15:00:20.745] > Looking for server with pid: 1494
> Starting server with command... /home/ubuntu/.vscode-server/bin/3c4e3df9e89829dc
> e27b7b5c24508306b151f30d/server.sh --start-server --host=127.0.0.1 --enable-remo
> te-auto-shutdown  --port=0  &> "/home/ubuntu/.vscode-server/.3c4e3df9e89829dce27
> b7b5c24508306b151f30d.log" < /dev/null
> printenv:
>     SSH_CONNECTION=68.132.254.210 57105 172.31.46.222 22
>     LANG=C.UTF-8
>     XDG_SESSION_ID=6
>     USER=ubuntu
>     PWD=/home/ubuntu
>     HOME=/home/ubuntu
>     SSH_CLIENT=68.132.254.210 57105 22
>     MAIL=/var/mail/ubuntu
>     SHELL=/bin/bash
>     SHLVL=2
>     VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
>     LOGNAME=ubuntu
>     XDG_RUNTIME_DIR=/run/user/1000
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[15:00:20.745] > 
> :/usr/local/games:/snap/bin
>     _=/usr/bin/printenv
> Spawned remote server: 2989
[15:00:20.753] > 
> Waiting for server log...
.......
[15:00:28.621] > Waiting for server log...
[15:00:28.655] > Waiting for server log...
[15:00:28.689] > Waiting for server log...
[15:00:28.723] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,  
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) 
> *
> 
[15:00:28.733] > 
> Server did not start successfully. Full server log at /home/ubuntu/.vscode-serve
> r/.3c4e3df9e89829dce27b7b5c24508306b151f30d.log >>>
> <<< End of server log
> 1b2d18264e08: start
> exitCode==32==
> listeningOn====
> osReleaseId==ubuntu==
> arch==x86_64==
> tmpDir==/run/user/1000==
> platform==linux==
[15:00:28.736] > 
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime==7980==
> 1b2d18264e08: end
[15:00:28.736] Received install output: 
exitCode==32==
listeningOn====
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime==7980==
[15:00:28.742] Resolver error: Error: The VS Code Server failed to start
    at Function.ServerInstallError (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:64575)
    at c (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:58900)
    at Object.t.handleInstallOutput (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:63317)
    at Object.t.tryInstall (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:413984)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:294518
    at async Object.t.withShowDetailsEvent (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:405329)
    at async Object.t.resolve (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:295639)
    at async c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:127:110530
[15:00:28.748] ------
[15:00:29.311] "install" terminal command done
[15:00:29.311] Install terminal quit with output: 
nyolive
  • 141
  • 1
  • 1
  • 3
  • I want to know the answer to this too. I'll try to reproduce – WurmD May 03 '21 at 21:19
  • I had this problem with a newly-updated Insiders build. Going back to Stable was the only thing that fixed it for me. – rymo Feb 10 '22 at 17:18

6 Answers6

16

I had the same issue. On the remote system, I removed the /.vscode-server folder, which forces the vscode-server.tar.gz to be downloaded again, unzip the folder and extensions get transferred by scp.

rm -fr ~/.vscode-server/

If your remote device does not have access to internet, you can use this: Install VSCODE server offline

Pranav Kumar
  • 254
  • 2
  • 7
7

I had the same issue. The solution that worked for me was reinstalling the VS Code server on the remote host. Below are the instructions:

All the operations are done on the local VS Code's command palette:

  1. open the command palette
  2. select "Remote-SSH: uninstall vscode server from host"
  3. select the remote host that you can't connect to

Then, restart the VS Code and reconnect. The VS code server will be reinstalled on the remote host and now you should be able to connect to it.

Bob Huang
  • 71
  • 1
  • 3
6

I had the same issue. What worked for me was to update the vscode extensions: -Remote-Containers -Remote-SSH -Remote-WSL

Adam Geva
  • 61
  • 1
  • 2
3

I had the same issue. What fixed it for me was to kill the vscode server on the host:

  1. ctrl+shift+p to open command palette.
  2. Select "Remote-SSH: kill VS Code Server on Host..."
  3. Select the host that you can't connect to.

Then, restart VS Code and reconnect.

Jason
  • 63
  • 7
2

I hit this when running out of disk space (or quota). Try ssh-ing directly to the remote host and creating some new files (e.g., tar zcvf ~/vscode-backup ~/.vscode-server).

Ken Arnold
  • 1,942
  • 1
  • 20
  • 24
0

I had the same issue, checking the log file inside ~/.vscode-server on host I could find that libatomic.so.1 was missing. Install using:

apt install libatomic1

If you find any other lib missing, I suggest you use "apt-file search " and install every missing package you get from the log.

Diego Medeiros
  • 463
  • 5
  • 9