Is it possible to access Kibana (Elasticsearch) via ssh tunnel?

I am trying to access kibana from a remote machine through an SSH tunnel:

ssh -f user@elastichost -L 5601:elastichost:5601 -N

My remote browser just times out with a "waiting for a response". Is there a reason why this should not work?


Solution 1:

Use ssh -D8181 user@elastichost to create a SOCKS (dynamic) proxy, and then configure your browser to use your newly created SOCKS proxy 127.0.0.1:8181.

Its the best way for port-forwarding a website (particularly when name-based virtual hosts are involved, or Javascript is generating the URL, which is very likely what's happening with your problem, although I haven't looked at Kibana version 4 much at this time).