於是找到
http://www.cnblogs.com/learn21cn/p/6189023.html
https://spin.atomicobject.com/2017/12/18/remote-vscode-file-editing/
以下linux作業系統就是我的遠端
在linux上裝rmate
在vsc上裝Remote VSCode擴展
自訂一下ssh config
就可以直接在命令列上打入
C:\Users\xin02> ssh kestanley
root@10.10.10.32's password:****
來登入linux
然後
rmate my.text 就可以在VSC打開囉
但是!!!
這種方法不是我想要的那種,這一次只能開一個檔案,我希望他跟平常一樣在旁邊的explorer列出所有的文件阿~~~
於是乎放棄上面這種方法
改用
https://github.com/liximomo/vscode-sftp
SFTP這個擴展就大功告成了,繞了好大一圈阿
{
"protocol": "sftp",
"context":"D:\\remote",
"host": "10.10.10.32",
"port":22,
"username": "root",
"password":"****",
"ignore": [
".vscode",
".git",
".DS_Store",
".svn"
],
"uploadOnSave": true,
"remotePath": "/usr/share/nginx/html/"
}
沒有留言:
張貼留言