Re: ssh port forwarding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



________________________________
 From: Ski Dawg <centos@xxxxxxxxxxx>
To: CentOS mailing list <centos@xxxxxxxxxx> 
Sent: Thursday, July 12, 2012 10:20 AM
Subject:  ssh port forwarding
 
We are wanting to make mysql connections over an ssh tunnel.

In this case, lets say that hostA is our local machine, and hostB is the
Amazon EC2 instance. I have tried several different variations (that I have
found from google searching), including:
from hostA: ssh -L 22222:hostB:3306 user@hostB
from hostA: ssh -L 22222:localhost:3306 user@hostB
from hostA: ssh -L 22222:hostB:3306 user@localhost


--
Doug

==

Doug:
  Depending on how the mysql is bound on hostB, either variation 1 or 2 should work. Variation 3 doesn't look very useful, since it implies hostA can already access tcp/3306 on hostB.
  After you build the port forwards, and open another terminal on HostA, and do:

$ telnet localhost 22222

What does it do?

Also, just to verify, if you're on hostB and do:

$ telnet localhost 3306

Does it 'connect' to a tcp port?
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux