Accessing CouchDB Futon on a remote server

2019-02-02 02:16发布

问题:

I've installed CouchDB on a remote server that I have access to through a terminal telnet/ssh client.

The server is running on CentOS6.

I really want to be able to work with Futon, but I cannot at the moment because I can only open localhost:5984 in the ssh client.

Any suggestions on how to work around this?

回答1:

Just create ssh tunnel to your remote CouchDB instance:

ssh -f -L localhost:15984:127.0.0.1:5984 user@remote_host -N

And after that your remote CouchDB Futon that still serve on localhost address will be available for you by address: http://localhost:15984/_utils. Replace local port 15984 by your choice.

P.S. There is also awesome guide from Linode wiki with example couchdb-tunnel script. Hope it helps.