首先在VScode中下載安裝插件SFTP
Windwos下摁Ctrl+Shift+P,輸入SFTP: config命令並運行,進入sftp.json配置項如下:
{ "name": "站點名稱", "host": "ip地址", "port": 22, "username": "登錄名", "password": "登錄密碼", "protocol": "sftp", "agent": null, "privateKeyPath": null, "passphrase": null, "passive": false, "interactiveAuth": true, "remotePath": "需要打到的遠程的文件夾地址", "uploadOnSave": true, "syncMode": "update", "ignore": [ "**/.vscode/**", "**/.git/**", "**/.DS_Store" ], "watcher": { "files": "glob", "autoUpload": true, "autoDelete": true } }
修改為自己機器對應的配置Ctrl+S即可。