官网下载最新版本
如果下载过慢:https://zhuanlan.zhihu.com/p/112215618
目标机器安装
插件市场:[https://marketplace.visualstudio.com/search?target=VSCode&category=All categories&sortBy=Installs](https://marketplace.visualstudio.com/search?target=VSCode&category=All categories&sortBy=Installs)
下载ssh插件(Download Extension)
在目标机器中打开vscode
点击拓展,右上角…找到vsix安装,打开插件市场下载的插件进行离线安装
打开vscode→帮助→关于
点击复制(因为我写博客和自己实际用的离线机器不同,所以截图中的ID有差别,以实际ID为准,图片只做示范参考)
版本: 1.69.2
提交: da76f93349a72022ca4670c1b84860304616aaa2
日期: 2022-07-18T16:14:10.636Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Linux x64 5.4.0-123-generic
复制提交后面的ID,这里是da76f93349a72022ca4670c1b84860304616aaa2
假设远程ssh服务器是linux64位的,利用这个ID下载server-linux-x64压缩包
https://update.code.visualstudio.com/commit:da76f93349a72022ca4670c1b84860304616aaa2/server-linux-x64/stable
把下载好的vscode-server-linux-x64.tar.gz文件放在远程ssh服务器上
mkdir -p ~/.vscode-server/bin/da76f93349a72022ca4670c1b84860304616aaa2
tar zxf vscode-server-linux-x64.tar.gz -C ~/.vscode-server/bin/da76f93349a72022ca4670c1b84860304616aaa2
touch ~/.vscode-server/bin/da76f93349a72022ca4670c1b84860304616aaa2/0