David J.
David J.

Reputation: 1913

Use ssh to access couchdb on remote server from mobile device

I have an instance of couchdb running on my local port 5984.

My ultimate goal is to run couchdb on a server within a closed network, and be able to send requests to this server from mobile devices within the network.

This post seems to provide a solution, provided I can open a terminal and make an ssh tunnel:

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

But I obviously won't be able to access the command line on mobile devices to make the tunnel. How does one go about accessing applications from mobile devices within closed networks? (I can't just deploy it to some web server as I don't have access to the internet)

Upvotes: 4

Views: 422

Answers (3)

jan6
jan6

Reputation: 449

You CAN run command line on Android, for example with this terminal emulator you can copy a statically linked ssh binary to /data/data/jackpal.androidterm/app_HOME then cd $HOME and ./ssh to execute it

and there are graphical ssh clients, some of which might have the functionality

also termux should have an ssh client available, you probably need to "apt install ssh" when in the app to get it.

Upvotes: 1

Thaw
Thaw

Reputation: 861

You can write a client via sudo apt-cache search libssh; it supports tunneling AKA forwarding.

#include <libssh/libssh.h>

http://api.libssh.org/master/libssh_tutor_forwarding.html

Upvotes: 0

Philippe Banwarth
Philippe Banwarth

Reputation: 17735

You can create a SSH tunnel if the client supports port forwarding. Those I know are :

Upvotes: 1

Related Questions