PDA

View Full Version : How to create an SSH tunnel ?




Angelo95210
Nov 3, 2009, 02:23 AM
Hi guys !

I want to create a SSH tunnel from my mac to my webserver, in order to use MySQL Query Browser. I am not allowed to access the MySQL db from outside but I have an SSH access... (on port 2222)

Does someone know how to do this ?

Here are the command I tried :
ssh -p2222 -L 3306:localhost:3306 user@host
ssh -L 3306:localhost:3306 "-p2222 user@host"

Each time I got this error message from the console when I try to connect with MySQL Query Browser :
open failed: administratively prohibited: open failed

Guys would be great if you could help ! ;-)



Serif
Nov 3, 2009, 08:07 AM
Looks OK to me. There might be a clue in the server logs as regards why it is disallowing the connection. I'm guessing from the message that the MySQL server is seeing your connection but hasn't been told to accept connections from the localhost? If you have the privileges, maybe use "tcpdump -i lo0 port 3306" to watch what is happening and confirm that you're seeing the traffic hit your server.

belvdr
Nov 3, 2009, 08:30 AM
It looks like they don't allow port forwarding through the server's SSH daemon by setting AllowTcpForwarding to No.

Angelo95210
Nov 4, 2009, 06:23 AM
OK I wil check about this guys. Many thanks.

FiveForMe
Nov 17, 2009, 07:37 AM
hi

I use the citect, but I dont know how create memory tag,I only create I/O tag