I want to create a code that connects to Elasticsearch through a SSH tunnel. To do that, I created an EC2 instance where I was able to ssh into it and install Elasticsearch. Then, I created RestHighLevelClient using this code to connect to it:
This is not how you typically connect to Elasticsearch so I would not expect the client to have any special provisions for configuring this. I do not know for sure though as >I am not familiar with this client.
If you can make it transparent to the client it might however work. I would therefore recommend securing your Elasticsearch properly and then make it available without needing to use a SSH tunnel.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.