Connection to your Synolog DSM 7.1 inside VS Code
If you are using VS Code Version 1.86.1 (January 2024) or higher and want to connect to your Synology NAS with DSM Version 7.1 or higher with SSH (via the Remote Explorer, Docker, Remote - SSH or Remote Development VS Code Extensions) you get an error message like this:
Failed to connect to the remote extension host server (Error: WrappedError(WrappedError { message: “error checking server integrity”, original: “failed to run command “/root/.vscode-server/cli/servers/Stable-e8653663e8840adaf45af01eab5c627a5af81807.staging/server/bin/code-server –version” (code 1): /root/.vscode-server/cli/servers/Stable-e8653663e8840adaf45af01eab5c627a5af81807.staging/server/node: /lib64/libm.so.6: version `GLIBC_2.27’ not found (required by /root/.vscode-server/cli/servers/Stable-e8653663e8840adaf45af01eab5c627a5af81807.staging/server/node)\n/root/.vscode-server/cli/servers/Stable-e8653663e8840adaf45af01eab5c627a5af81807.staging/server/node: /lib64/libc.so.6: version `GLIBC_2.28’ not found (required by /root/.vscode-server/cli/servers/Stable-e8653663e8840adaf45af01eab5c627a5af81807.staging/server/node)\n” }))
This essentially says that the GLIBC Version on your Synoloy is too old, so the requirement checks to install VS Code Server fail. You can see a list of requirements here: https://code.visualstudio.com/docs/remote/linux#_remote-host-container-wsl-linux-prerequisites
After some investigating I stumpled onto this issue and corresponding pull request, which made it into the 1.86 release. You can see part of the corresponding code here: https://github.com/microsoft/vscode/blob/main/resources/server/bin/helpers/check-requirements-linux.sh#L17-L25
So, to skip the requirements check, you can just create a file inside yout Synologys /tmp folder as such:
touch /tmp/vscode-skip-server-requirements-check
This will let your VS Code instance connect to your Synology NAS and you will be able to remotely access the files on your NAS.
VS Code will show a warning popup when you connect to an OS version that is not supported. However I have not noticed any problems while using this method to connect to my Synology NAS.
Beware, this “fix” might break in the future as stated in this knowlege base atricle: https://code.visualstudio.com/docs/remote/faq#_can-i-run-vs-code-server-on-older-linux-distributions
VS Code will still allow users to connect to an OS that is not supported by VS Code (OS that does not provide glibc >= 2.28 and libstdc++ >= 3.4.25) until February 2025.
You can check the glibc Version of your OS by running ls -la /lib64/libc* and then looking for an entry called /lib64/libc.so.6 which will point to the libc.so with a version number like libc-2.26.so.
If you are still running into an error, you might also need to enable TCP Forwarding in your Synologys /etc/ssh/sshd_config.
sudo nano /etc/ssh/sshd_config and add this to the end of the file:
Match User YOUR-USERNAME
AllowTcpForwarding yes
Some people had success just installing the Git client form the SynoCommunity repository, but I could not replicate the success on my Synology NAS running DSM 7.1.1.
