liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 260 forks source link

Add multiple sftp/ftp host #754

Closed YanzhongSu closed 4 years ago

YanzhongSu commented 4 years ago

How to add multiple host in sftp.json file? Below config does not work

{
    "name": "test1",
    "host": "sftp.plattssp.com",
    "protocol": "sftp",
    "port": 22,
    "username": "test",
    "password": "test",
    "remotePath": "/",
    "uploadOnSave": false
}
{
    "name": "test2",
    "host": "pointconnectte.commodities.thomsonreuters.com",
    "protocol": "ftp",
    "username": "test",
    "password": "tes",
    "remotePath": "/",
    "uploadOnSave": false
}
laiker commented 4 years ago

I think it's not supported now

gawinwong commented 4 years ago

try this

{
    "name": "Remote Server",
    "protocol": "sftp",
    "port": 22,
    "ignore": [
        ".vscode",
        ".DS_Store",
        "__debug_bin",
        "*.exe",
        ".git",
        ".gitignore"
    ],
    "watcher": {
        "files": "**/*",
        "autoUpload": true,
        "autoDelete": true
    },
    "profiles": {
        "name1": {
            "host": "xxxxxx",
            "username": "xxxxxx",
            "password": "xxxxxx",
            "remotePath": "xxxxxx"
        },
        "name2": {
            "host": "xxxxxx",
            "username": "xxxxxx",
            "password": "xxxxxx",
            "remotePath": "xxxxxx"
        },
        "name3": {
            "host": "xxxxxx",
            "username": "xxxxxx",
            "password": "xxxxxx",
            "remotePath": "xxxxxx"
        }
    }
}
zhihuacc commented 6 months ago

try this

{
    "name": "Remote Server",
    "protocol": "sftp",
    "port": 22,
    "ignore": [
        ".vscode",
        ".DS_Store",
        "__debug_bin",
        "*.exe",
        ".git",
        ".gitignore"
    ],
    "watcher": {
        "files": "**/*",
        "autoUpload": true,
        "autoDelete": true
    },
    "profiles": {
        "name1": {
            "host": "xxxxxx",
            "username": "xxxxxx",
            "password": "xxxxxx",
            "remotePath": "xxxxxx"
        },
        "name2": {
            "host": "xxxxxx",
            "username": "xxxxxx",
            "password": "xxxxxx",
            "remotePath": "xxxxxx"
        },
        "name3": {
            "host": "xxxxxx",
            "username": "xxxxxx",
            "password": "xxxxxx",
            "remotePath": "xxxxxx"
        }
    }
}

What if I need use different ports for different hosts ?