【问题标题】:Elasticsearch remote access through SSH通过 SSH 远程访问 Elasticsearch
【发布时间】:2015-03-27 14:51:14
【问题描述】:

关于Elasticsearch HTTP API,我想知道我是否想远程访问SSH服务器上的集群, 我应该在我的 http rest 命令中包含什么:

    curl -XGET ' http://localhost:9200/ index /_mapping/ type ' 

我尝试了类似下面的方法但失败了:

    curl -XGET -u cloud-user: --key ~/.ssh/id_rsa --pubkey ~/.ssh/id_rsa.pub  'xx.xxx.xxx.xxx:9200/index/_mapping/type'

有没有人知道正确的命令或替代解决方案?

【问题讨论】:

标签: ssh elasticsearch


【解决方案1】:

如果您在 *NIX 环境中,这很容易,只需通过 ssh 隧道

ssh -Nf -L 9200:localhost:9200 user@remoteserver.com

稍后您通过 localhost 获取远程,如上面的隧道

curl -XGET 'http://localhost:9200/_search'

【讨论】:

  • 是否也可以通过这种类型的连接写入更改?这是一个不同的故事吗?
猜你喜欢
  • 1970-01-01
  • 2019-07-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-26
  • 2016-09-25
相关资源
最近更新 更多