Archive Index
This month's Index
|
Subject: [libssh2] remote port forwarding
[libssh2] remote port forwarding
From: Eddy Valdes <evaldes_at_yahoo.com>
Date: Fri, 21 Mar 2008 11:08:44 -0700 (PDT)
Has anybody successfully done remote port forwarding using libssh2? I can get local port forwarding to work well, but not remote port forwarding.
I have tried two different ways:
//libssh2_poll example
listener = libssh2_channel_forward_listen(session,3306);
retval = 0;
while (retval == 0)
retval = libssh2_poll(&ssh_file_descriptor,1,500);
printf("retval - %d, revents -%d\n",retval,ssh_file_descriptor.revents);
//Quick and dirty libssh_channel_forward accept
listener = libssh2_channel_forward_listen_ex(session,NULL,3306,NULL,16);
channel = libssh2_channel_forward_accept(listener);
Both methods successfully set up a listening socket on the remote box. In
Any suggestions would be greatly appreciated.
Thank you.
Eddy
-------------------------------------------------------------------------
_______________________________________________
|