About Elasticsearch HTTP API, I wonder if I want to remote access a cluster on SSH server, what should I include in my http rest command:
curl -XGET ' http://localhost:9200/ index /_mapping/ type '
I have tried something like below but got failed:
curl -XGET -u cloud-user: --key ~/.ssh/id_rsa --pubkey ~/.ssh/id_rsa.pub 'xx.xxx.xxx.xxx:9200/index/_mapping/type'
Is there anyone knows the correct command or alternative solution?
If you are on *NIX environment it is easy, just tunnel over ssh
ssh -Nf -L 9200:localhost:9200 [email protected]
Later you fetch the remote by localhost, as tunneled above
curl -XGET 'http://localhost:9200/_search'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With