在Windows上用VSCode远程修改Linux代码

基于Centos


一、Windows安装ssh

安装包:https://www.mls-software.com/files/setupssh-7.6p1-1.exe



二、Linux安装rmate

安装包:wget https://raw.githubusercontent.com/sclukey/rmate-python/master/bin/rmate
chmod +x ./rmate
mv ./rmate /usr/local/bin/rmate



三、VSCode安装Remote VSCode插件



四、VSCode中:ctrl + shift + P输入remote,点击Remote: Start Server



五、VSCode中新建终端,在Powershell模式下

ssh -R 52698:127.0.0.1:52698 [email protected]


登录远程后,要编辑某个文件,直接 rmate -p 52698 filename

 

你可能感兴趣的:(VSCode,代码)