Reputation: 1913
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
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
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
Reputation: 17735
You can create a SSH tunnel if the client supports port forwarding. Those I know are :
The paid version of JuiceSSH : Setting up a New Port Forward Profile
Connectbot : Long press in the hosts list and choose "Edit port forwards". The parameters are straightforwardly adapted from the -L
option.
Upvotes: 1