首页 > 技术文章 > mac 下 vscode配置SFTP连接

csuwujing 2018-11-09 13:35 原文

VScode中使用SFTP插件连接远程服务器进行文件修改

下载SFTP插件后,使用Ctrl+Shift+P。输入SFTP,选择第一个将会生成简短的默认配置文件

然后把sftp.json文件内内容换成以下配置:

{
    "host": "远程服务器IP地址",
    "port": 22,
    "username": "远程服务器登录名",
    "password": "远程服务器密码",
    "protocol": "sftp",
    "agent": null,
    "privateKeyPath": null,
    "passphrase": null,
    "passive": false,
    "interactiveAuth": true,
    "remotePath": "远程服务器路径,如(/usr/local/...)",
    "uploadOnSave": true,
    "syncMode": "update",
    "ignore": [
        "/.vscode/",
        "/.git/",
        "**/.DS_Store"
    ],
    "watcher": {
        "files": "glob",
        "autoUpload": true,
        "autoDelete": true
    }

}

推荐阅读