32

I'm trying to connect to a server via remote-ssh extension for Visual Studio Code, however, I'm getting the following error:

The vscode server failed to start SSH

Everything is fine on the server-side, and the connection to this host worked fine for a while.

Any suggestions to re-access the server via remote-ssh extension?

whoisraibolt
  • 2,082
  • 3
  • 22
  • 45

7 Answers7

75

After a while, I found a solution that can be useful to others.

In VS Code press:

CTRL + SHIFT + P

Type or select the option:

Remote-SSH: kill VS Code Server on Host...

enter image description here

Select the host name:

enter image description here

And after this procedure, try connecting again to the host.

That worked for me.

whoisraibolt
  • 2,082
  • 3
  • 22
  • 45
11

In my case it was ssh plugin issue. I updated remote ssh plugin then it worked

Krishan
  • 317
  • 4
  • 8
  • Current release version `v0.100` failed trying to connect to a raspberry pi. Deleting `~/.vscode-server` on the pi and using `v0.101.2023041015` (pre-release as of today) worked for me. – Jeffrey Martinez Apr 29 '23 at 07:43
2

Remote-SSH: kill VS Code Server on Host...

Didn't work for me, so I tried the other option:

Remote-SSH: Uninstall VS Code Server from Host...

It took a bit more time but worked for me!

2

For raspberry pi this helped me https://github.com/microsoft/vscode-remote-release/issues/8342#issuecomment-1501195063

Ok so it seems I was able to find a workaround provided here.

"I think you're having the same issue as me, but it's actually caused by an update to the pi. VScode is reading the uname -m value, the machine hardware name, which is returning aarch64, and so it is trying to run the 64 bit version of the remote server. In reality, your pi is likely using a armv7l (32 bit) user space. Remove the vscode remote server currently on the pi, then add arm_64bit=0 to /boot/config.txt and restart. If uname -m returns armv7l, then vscode should work again."

  • Remove vscode server from RPi: rm -rf ~/.vscode-server on the RPi.
  • Add the arm_64bit=0 to /boot/config.txt and restart as stated above on the RPi.
  • Start your vscode again from the host and start your remote connection. This will download the correct server.
will.mendil
  • 752
  • 2
  • 6
  • 21
0

wrong proxy setting may cause problem. If Remote-SSH: kill VS Code Server on Host command not work for you, open settings and clear proxy setting and retry.

Xi Gou
  • 49
  • 2
0

Everything is fine on the server-side, and the connection to this host worked fine for a while.

In case it is a simple intermittent network issue, VSCode 1.70 (July 2022) will retry the connection for you (up to 5 times)

See issue 127565 and PR 156444

Retry up to 5 times the initial authority resolving and also retry up to 5 times the initial connection

When connecting to a remote, if the initial connection fails, we will give up. The idea was that retrying would be useless, since the initial setup might have failed.

But it is possible that perhaps it was an intermittent network error.

This is available in VSCode insiders today.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Update the Remote ssh check file groups belongs to same group if you manually copied .vscode-server

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 30 '22 at 08:31