1. [本地] VSCode 安装 Remote VSCode
2. [服务器] 安装 https://github.com/aurora/rmate
sudo wget -O /usr/local/bin/rmate https://raw.githubusercontent.com/aurora/rmate/master/rmate
sudo chmod a+x /usr/local/bin/rmate
3. [本地] VSCode 运行
- F1 并输入
Remote: Start server
- 创建 SSH Tunnel:
ssh -R 52698:127.0.0.1:52698 [email protected]
4. [服务器] 打开文件
rmate -p 52698 file