AntonShuvaev / elasticsearch4idea

Elasticsearch Plugin for JetBrains IDEs
https://plugins.jetbrains.com/plugin/14512-elasticsearch
58 stars 8 forks source link

Cannot connect when using SSH tunnel #152

Open ondrejfuhrer opened 1 month ago

ondrejfuhrer commented 1 month ago

Describe the bug

I'm using an SSH tunnel when connecting to our ES instance, however when I try to connect to it, I'm getting Connection test failed: com.jcraft.jsch.JSchException: Auth fail for methods 'publickey' error. However the configuration is correct, since using the same config works when connecting via IntelliJ to e.g. databases using the same tunnel.

So I'm not sure what could be wrong with this. Possible solution I see is to use the SSH configurations provided by IntelliJ, but I'm not sure if that's possible to access.

One thing to note is that I'm using OpenSSH configuration files parser (which I previously changed from Legacy one). Not sure if that's related or not.

Steps to reproduce

  1. use SSH configuration
  2. use OpenSSH config and authentication agent as auth type
  3. try to connect Expected behavior

    Connection should be successful. Environment information:

    • OS: MacIS
    • IDE version: IntelliJ IDEA 2024.1.2 (Ultimate Edition)
    • plugin version: 2024.1.2-241
    • Elasticsearch or OpenSearch version: OpenSearch 2.11.0