0

I have a rooted Galaxy S4.

I'm trying to establish an SSH tunnel so I can access mysql from my phone.

I've tried using multiple SSH apps to tunnel but I can never get any of my tunnels to work.

I think I'm doing something wrong, I would appreciated help.

Here is the command equivalent of the tunnel I'm trying to setup for mysql access.

ssh -L 1234:[mysql adress]:3306 [my ssh user]@[my domain name].com

Where [mysql adress] is the same address I use in php to connect to,
[my ssh user] is the username I use to login into ssh and ftp,
[my domain name] is the domain name I have and the one I use for ssh and ftp.

After that I would try to connect to mysql by connecting to

[my domain name].com:1234

and it would time out while waiting for response.

I've tried using different tunnels to test, but I can't get any of them to work.

I've tried to tunnel to the website http

ssh -L 1234:127.0.0.1:80 [my ssh user]@[my domain name].com

And it just hangs when I try to load

[my domain name].com:1234 

in the browser.

I've also tried to tunnel to the website FTP server

ssh -L 1234:127.0.0.1:21 [my ssh user]@[my domain name].com

And it just hangs at "connecting" when I try to connect to

[my ftp user]@[my domain name].us:1234 

with an FTP client.

I've tried using multiple SSH apps.

Can anyone give me any advice?

4
  • try the -v switch in ssh to see if the tunnel creation was successful
    – golimar
    Aug 22, 2013 at 14:25
  • I know the tunnel creation was successful because my app tells me.
    – Nikzilla
    Aug 22, 2013 at 20:33
  • Off topic: belongs on superuser.com or serverfault.com.
    – EJP
    Aug 28, 2013 at 1:37
  • @EJP The question is about using an Android client to connect to a particular service. It has nothing to do with the server or server configuration in any way. Why does it belong on either of those two? May 22, 2015 at 10:46

1 Answer 1

1

Once the tunnel is created, you should connect to mysql using localhost:1234 or 127.0.0.1:1234

You must log in to answer this question.