VS Code Remote - GitMasterNikanjam/C_WiKi GitHub Wiki
When you use VS Code Remote features (like Remote-SSH, WSL, or Containers), VS Code does not run fully on your local machine.
Instead:
- Your local VS Code = UI only
- A VS Code Server runs on the remote Linux machine
That server lives here (by default):
~/.vscode-server/Inside it youβll see things like:
.vscode-server/
βββ bin/
β βββ <commit-id>/ # VS Code server binaries
βββ extensions/ # Remote extensions
βββ data/
βββ machineid
Each <commit-id> corresponds to the exact VS Code version on your local machine.
When you connect via Remote-SSH:
-
VS Code checks the local VS Code commit ID
-
It tries to download a matching vscode-server-linux-x64.tar.gz
-
It extracts it into:
~/.vscode-server/bin/<commit-id>/
If the remote machine has no internet, this download failsβhence the need for offline install.
On your local machine:
code --versionExample output:
1.86.2
903fc45b6b5b9c5a87f6f9e6d8a0f4a1d2e3c456
x64
π The second line is the commit ID Save it somewhere.
Use this exact pattern:
https://update.code.visualstudio.com/commit:<COMMIT_ID>/server-linux-x64/stableExample:
wget https://update.code.visualstudio.com/commit:903fc45b6b5b9c5a87f6f9e6d8a0f4a1d2e3c456/server-linux-x64/stable \
-O vscode-server-linux-x64.tar.gzUse scp, USB, or whatever transfer method you have:
scp vscode-server-linux-x64.tar.gz user@remote:/home/user/On the remote machine:
mkdir -p ~/.vscode-server/bin/<COMMIT_ID>Extract:
tar -xzf vscode-server-linux-x64.tar.gz \
-C ~/.vscode-server/bin/<COMMIT_ID> \
--strip-components=1Set permissions (important):
chmod -R 755 ~/.vscode-serverCreate this file:
touch ~/.vscode-server/bin/<COMMIT_ID>/server.shUsually not required, but helps in some restricted setups.
Now reconnect using Remote-SSH.
If everything matches:
- β No download attempt
- β VS Code reuses the existing server
- β Connection succeeds offline
- Commit ID mismatch β local VS Code version must match server version
chmod -R 755 ~/.vscode-serverMake sure you downloaded the correct architecture:
server-linux-x64server-linux-arm64
Check with:
uname -m-
.vscode-server= backend VS Code running on remote Linux -
Must match your local VS Code commit
-
Offline install = download tarball β extract into:
~/.vscode-server/bin/<commit-id>/