Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code Remote Development using SSH to Raspbian

I want to run Visual Studio Code Remote Development using SSH to my Raspberry Pi 3 Model B+ running Raspbian GNU/Linux 9 (stretch).

I have tried to follow the "Getting started" instructions. I run the command Remote-SSH: Connect to Host..., but I get the message Can't connect to [email protected]: unreachable or not Linux x86_64 (Linux armv7l )

As far as I know, Raspbian is 32 bit. So, does this mean that what I want to achieve is impossible?

I can connect to the Raspberry Pi using ssh on the command line without problems (not password based). I'm running VS Code insiders on macOS Mojave 10.14.4.

like image 880
Klas Mellbourn Avatar asked May 04 '19 13:05

Klas Mellbourn


1 Answers

Update 2: As of the 10th of February, x86_64, ARMv7l (AArch32) and ARMv8l (AArch64) are the supported Linux architectures for Remote SSH. It it appears that a glibc based Linux distribution is needed to meet certain prerequisites/dependencies. There is also experimental support for Windows 10/Windows Server 2016/2019 in the Insiders builds. More information can be found on the prerequisites information page.

Update: As of the 12th of June, approximately one month after my answer to this, support was added for the Raspberry Pi 3. There is no support for other ARM architectures yet, and this does not work with the Raspberry Pi Zero W yet, but I'm not sure about the Raspberry Pi 1 or 2. One point to note at present is that you need to setup public key authentication so you have passwordless login, otherwise you'll need to enter your Raspberry Pi's password multiple times, and it will ultimately fail. Also, as mentioned in a comment, if you've tried the 'stable' Remote Development extensions and found out they didn't work... you need to make sure you remove them from both VSCode AND your Raspberry Pi... else it really won't work. This is also mentioned in the Github issue.

Because of how the Remote SSH function actually work, when you connect to your SSH host, the Remote SSH extension provisions the so-called VS Code Server to that host, so the VS Code Server has to be able to run in your remote environment. Consequently, at present, each architecture may need different implementations or tweaks, before it will be considered 'supported'. At the time of writing, there are no armv7l builds, but this recently changed. We're still early days for this useful looking functionality... but things are changing quickly... There is no Windows or MacOS SSH host support at present... but this may not be the case in another months time.

There is an issue open on GitHub on this topic, so it may be worth keeping an eye on it or subscribing to it to see if/when support is added.

like image 178
Peter Feerick Avatar answered Oct 10 '22 05:10

Peter Feerick