liximomo / vscode-sftp

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

Profile switching does not work, when the host (tunnel server) is same in profile but hop server is diffrent #755

Open surenderpratap opened 4 years ago

surenderpratap commented 4 years ago

Below is sample config.

Here in profiles host is same but HOP server is different, so when we try to switch between it does not connect prod server.

{ "name": "EXAMPLE CONFIG", "protocol": "sftp", "uploadOnSave": false, "ignore": [ ".vscode", ".git", ".DS_Store" ], "profiles": { "dev": { "name": "FOR STAGING", "host": "157.240.198.35", "username": "ssh-user", "privateKeyPath": "D:/SSHKey/key.pem", "port": 22, "remotePath": "/var/www/html", "hop": { "host": "172.217.167.197", "username": "staging-user", "privateKeyPath": ".ssh/staging.pem", "port": 22 } }, "prod": { "name": "FOR PROD", "host": "157.240.198.35", "username": "ssh-user", "privateKeyPath": "D:/SSHKey/key.pem", "port": 22, "remotePath": "/var/www/html", "hop": { "host": "172.217.160.238", "username": "prod-user", "privateKeyPath": ".ssh/prod.pem", "port": 22 } } }, "defaultProfile": "dev" }

brando90 commented 4 years ago

Below is sample config.

Here in profiles host is same but HOP server is different, so when we try to switch between it does not connect prod server.

{ "name": "EXAMPLE CONFIG", "protocol": "sftp", "uploadOnSave": false, "ignore": [ ".vscode", ".git", ".DS_Store" ], "profiles": { "dev": { "name": "FOR STAGING", "host": "157.240.198.35", "username": "ssh-user", "privateKeyPath": "D:/SSHKey/key.pem", "port": 22, "remotePath": "/var/www/html", "hop": { "host": "172.217.167.197", "username": "staging-user", "privateKeyPath": ".ssh/staging.pem", "port": 22 } }, "prod": { "name": "FOR PROD", "host": "157.240.198.35", "username": "ssh-user", "privateKeyPath": "D:/SSHKey/key.pem", "port": 22, "remotePath": "/var/www/html", "hop": { "host": "172.217.160.238", "username": "prod-user", "privateKeyPath": ".ssh/prod.pem", "port": 22 } } }, "defaultProfile": "dev" }

did you find a solution to this? Where you just trying to change defaultProfile and see if it would push to the other remote?