This works but why? All example code I have seen points rhost at the remote 
host.
 
> Date: Wed, 16 Feb 2011 10:41:53 +0900
> To: dwr...@hotmail.com
> CC: jsch-users@lists.sourceforge.net
> Subject: Re: [JSch-users] setPortForwardingL not working for MySQL
> From: y...@jcraft.com
> 
> Hi,
> 
> +-From: bob manc <dwr...@hotmail.com> ----
> |_Date: Tue, 15 Feb 2011 10:37:33 -0500 __
> |
> |This is what I am doing... 
> |Lets say my remote server is at "dev.myserver.com". 
> |I have MySQL and Tomcat running on it. Port 22 and 80 are open on it.
> ...
> |lport = 3306;
> |rhost = "dev.myserver.com";
> |rport = 3306;
> ...
> |int assigned_port = session.setPortForwardingL(lport, rhost, rport);
> ...
> |The funny thing is if I change lport and rport to 80 I can point my 
> |browser at http://localhost/ and see the page on the server. 
> |The only thing I can think of is port 80 and 22 are open on the server
> |and 3306 is closed but I thought that was the whole point of port 
> |forwarding to forward over 22. I can also access the db using the port 
> |forwarding built into SQLyog using the same configuration.
> |What am I doing wrong?
> 
> How about changing the rhost;
> 
> rhost = "127.0.0.1";
> 
> 
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
> +1-415-578-3454
> Skype callto://jcraft/
> Twitter: http://twitter.com/ymnk
                                          
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to