Accessing Couchbase Console Over SSH Tunnel

Couchbase has a web based console that is accessed using port 8091. If you are running Couchbase in an EC2 instance you could open up port 8091. But a more secure option is to use SSH tunnel.

In your local desktop machine, such as Mac or Ubuntu, enter this command:

ssh -i keyfile.pem -D 8080 -C -N user@example.com

This makes SSH a proxy server. The command line options are:

  • keyfile.pem – The name of your private key file.
  • -D 8080 – The proxy server port will be 8080. The proxy server will forward all traffic to the remote machine. The host name of the remote machine is derived from the user identity. That will be example.com in this case.

Now, configure your browser with the following proxy setting:

  • Proxy type – SOCKS proxy
  • Host name – 127.0.0.1
  • Port – 8080

For example, in Mac, the setting will look like this:

image

Now, to access Couchbase console, enter the URL: http://localhost:8091.

When you are done using the console, change the proxy setting back to the original. Then terminate the SSH session by hitting Control+C.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.