You don’t know how helpfull this has been.
sshfs (on vs code) + Terminal & SSH (on my home assistant rpi4)
You don’t know how helpfull this has been.
sshfs (on vs code) + Terminal & SSH (on my home assistant rpi4)
That’s nice!
This can be achieved with the SSH & Terminal addon that many likely already have.
Here’s the required configuration parameters (everything else is à votre gout)
Some customization is required prior to being able to connect to your Home Assistant install with Visual Studio Code. The following configuration will aid in setting up VSCode Remote - SSH:
packages:
- gcompat
- libstdc++
- curl
allow_remote_port_forwarding: true
allow_tcp_forwarding: true
Many thanks, @brandonnolet. I was fiddeling around for a long time but could not get this to work. With your config snippet, I finally got the VS Remote SSH setup working!
The configuration to get this to work was slightly different for me, the Terminal & SSH yaml should look something like this.
apks:
- gcompat
- libstdc++
- curl
server:
tcp_forwarding: true
remote_port_forwarding: true
allow_remote_port_forwarding
doesn’t seem to be valid anymore.
Otherwise has been functional for me. Though, I still get The remote host may not meet VS Code Server's prerequisites for glibc and libstdc++
.
No idea if this error is breaking anything, but I haven’t yet noticed it if so.
Hey all. In trying to get this working I felt like it was all just throwing spagetti at a wall. So I went about figuring out how all this works.
This VS Code docs page describes the prerequisite libraries preinstalled for each linux distribution.
Running cat /etc/os-release
in the HomeAssistant SSH terminal results in this.
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.3
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
So HA runs in Alpine Linux.
From the vscode docs, these are the packages build into the OS.
And they state:
The extensions are known to work when connecting to recent stable/LTS version of:
- Ubuntu 64-bit x86, ARMv8l (AArch64) (16.04+, IoT 18.04+)
- Debian 64-bit x86, ARMv8l (AArch64) (Stretch/9+)
- Raspberry Pi OS ARMv7l (AArch32) 32-bit (Stretch/9+) (previously called Raspbian)
- CentOS / RHEL 64-bit x86 (7+)
- Alpine Linux 64-bit x86 containers or WSL hosts (3.9+) in Dev Containers, WSL
So, all we should have to do is connect and it should work. But, it doesn’t.
Turns out we do need glibc
but it’s not part of Alpine Linux.
That leads to gcompat
.
gcompat, is a library which provides glibc-compatible APIs for use on musl libc systems.
Basically, gcompat
provides glibc
for Alpine.
So, this is the config that works for me.
authorized_keys: []
password: ThisIsMyPassword
apks:
- gcompat
server:
tcp_forwarding: true
remote_port_forwarding: true
And when VS Code attaches it throws the “can’t find glibc” warning because glibc
doesn’t actually exist, gcompat
does.
From the connection console output in VS Code…
I think this explains everything that is going on. We’re able to connect and can safely ignore the missing lib warnings.
Best,
Jeremy
Thanks, it’s work with my raspberry pi 3.
Is it possible to disable the
The remote host may not meet VS Code Server's prerequisites for glibc and libstdc++
warning at connection in VScode?
Read the last part of my post to see why that isn’t possible.
This setup stopped working for me, I suspect due to recent changes in Vscode more info.
At the moment the only suggested option seems to be downgrading Vscode
Hello, I confirm that the issue is on VS Code’s side with the 1.86.0 update.
See my post in another thread for related information, followed by the modus operandi to downgrade, and a workaround further down the discussion that you might wish to try.
Happy to report that VS Code 1.86.1 update that was released on Feb. 8th has solved the issue, enabling again to connect to HA instance over SSH.
How to install the upgrade:
Note Microsoft’s position here:
We have discussed this more in the VS Code team and we have decided to allow VS Code to connect to an OS that is not supported by VS Code (no support for glibc >= 2.28) for 12 more months .
We hope this will provide the needed time for you and your companies to migrate to newer Linux distributions.
So while the issue is solved in the short term, we still need a proper solution for the longer term.
Cheers!
This was the solution for me: How to connect local VSCode instance to VS Code HA Add-on via ssh? - #36 by Nexxado