sublime sftp connects to wrong container

2019-07-22 15:21发布

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.jsonfile 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 "IdentetiesOnly YES" to the SSH config file, then I connected to the correct dev environment.

Is there any setting similar to "IdentetiesOnly YES" that I need to add to the sftp-config.json files, so that my sublime text also connects to the correct dev environment?

I hope I could make myself clear with my question. If you have any questions, please don't hesitate to ask me.

0条回答
登录 后发表回答