在远程服务器上访问CouchDB Futon

use*_*278 14 ssh couchdb telnet

我已经在远程服务器上安装了CouchDB,我可以通过终端telnet/ssh客户端访问该服务器.

服务器在CentOS6上运行.

我真的希望能够使用Futon,但我现在不能,因为我只能在ssh客户端中打开localhost:5984.

关于如何解决这个问题的任何建议?

Kxe*_*pal 26

只需创建到远程CouchDB实例的ssh隧道:

ssh -f -L localhost:15984:127.0.0.1:5984 user@remote_host -N
Run Code Online (Sandbox Code Playgroud)

之后,仍然可以通过地址为您提供仍在本地主机地址上提供服务的远程CouchDB Futon : http://localhost:15984/_utils. 根据您的选择替换本地端口15984.

PS还有来自Linode wiki的精彩指南,其中包含示例couchdb-tunnel脚本.希望能帮助到你.