After following these steps, I’m now able to connect my desktop VS Code (1.85.2) to VS Code HA add-on via SSH, as I used to previously.
The underlying issue remains however: a dependency on some libraries on HA add-on’s side (minimum GLIBC >= 2.28 apparently from the comments in the GitHub issues) is preventing VS Code 1.86.0 from connecting successfully over SSH.
Hoping this issue will be fixed soon…
Nice, can confirm that downgrading the versions gets it working again. I took a look at the github issues and currently they’re not planning to fix it but may have misjudged how widely used it is. Luckily someone developed a workaround script for the latest versions as well. First you’ll need to add some more packages to the SSH addon:
nodejs
npm
make
g++
With those installed, save the script in one of the mounted directories like /root/share, otherwise you’ll lose it when the container restarts. All I changed was the mynode variable to /usr/bin/node. After running the script to install the npm dependencies, remote ssh with vscode 1.86 is back in business.
Even better - the new versions allow you to silence that notification about not meeting all the prerequisites.
It fires up a Remote Tunnel (not Remote SSH) to connect to from your vscode or vscode.dev using your Github credentials. Works perfect! You do need to enable it after every HA restart… but hey… we’ve got automations for that
The install goes to /root/.vscode-server, so that should stick around while you’re using the same container including after rebooting. I think the only time you’d need to re-run it is after upgrades to the SSH addon.
Looking again now, the easiest way to run it is probably to add it to the init_commands of the addon:
/bin/bash /root/share/vscodefix.sh
On my system that still takes about a minute to run after it’s already installed, so give it some time for npm to do its thing.
That didn’t seem to work for me. Had to swap to YAML mode config as packages were failing to save and there was no field for init_commands but I think I have it right.
I can’t seem to spot anything interesting/related to the script in the addon logs either.
How would I go about just running this script manually for now, just throw it into the addons terminal?
Rebooted HA and VSCode seems to be up and running now. Cheers for the help!
Hello, could you help me understand how using this integration would help solve the libraries issues?
The diagram on the VS Code Remote Tunnels page shows VS Code server running on the remote environment, which in my case would be my HA OS installation (installed in a VM on Proxmox).
How/why would this situation be different & better than my current configuration using the Advanced SSH & Web Terminal add-on?
It’s just easy to set up and it works with vscode.dev too (browser app / PWA). I’m not trying to sell it, just telling it’s working great and doesn’t require you to set up SSH access…
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.
I recently tried to use the SSH extension as well with the latest VSCode and and latest HA updates. The VSCode remote Server seems to need a real ps command and not the alpine shipped busybox variant.
If anyone faces some issues and sees a ps related error in the log try adding the package procps to the packages section of the ssh and terminal extension.
This made it work for me.
But at some point, most likely after some of the update, I am unable to edit through VS code.
Failed to save ‘!’: Unable to write file ‘vscode-remote://ssh-remote+192.168.x.1/root/config/xxx.yaml’ (NoPermissions (FileSystemError): Error: EACCES: permission