问题
I have two different Docker containers under the same host stack.
Currently I'm on OSX and using Sublime Text 3 with the SFTP plugin.
For each different dev environment (Docker container) I have a different sftp-config.json
file and I am using different SSH key files.
Here are my host entries for both files:
first host:
"host": "example-dev.xxx.de",
"user": "userxxx",
"remote_path": "/home/xxx/www_trunk",
"ssh_key_file": "~/work/Misc/pass/private1.pem"
second host:
"host": "example2-dev.xxx.de",
"user": "userxxx",
"remote_path": "/home/xxx/www_trunk",
"ssh_key_file": "~/work/Misc/pass/private2.pem"
But when I try to connect to the second host, I always end up on the fist one.
I had the same problem with the OSX terminal before, until I added "IdentitiesOnly YES" to the SSH config file, then I connected to the correct dev environment.
Is there any setting similar to "IdentitiesOnly YES" that I need to add to the sftp-config.json
files, so that my sublime text also connects to the correct dev environment?
来源:https://stackoverflow.com/questions/36340195/sublime-sftp-connects-to-wrong-container