elasticsearch4idea icon indicating copy to clipboard operation
elasticsearch4idea copied to clipboard

Cannot connect when using SSH tunnel

Open ondrejfuhrer opened this issue 1 year ago • 2 comments

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: MacOS
  • IDE version: IntelliJ IDEA 2024.1.2 (Ultimate Edition)
  • plugin version: 2024.1.2-241
  • Elasticsearch or OpenSearch version: OpenSearch 2.11.0

ondrejfuhrer avatar Jun 05 '24 15:06 ondrejfuhrer

I can't use the SSH on Webstorm either.

But the error I'm getting is: Connection test failed: java.net.SocketException: Connection reset

(I setup the SSH by Putty in order to use the plugin)

eaqueiroz avatar Sep 27 '24 15:09 eaqueiroz

There is a workaround though - using stored private key on the disk.

ondrejfuhrer avatar Sep 27 '24 20:09 ondrejfuhrer