[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Open several reverse port forwarding channels in one session
[Thread Prev] | [Thread Next]
- Subject: Open several reverse port forwarding channels in one session
- From: Oleksandr Shneyder <oleksandr.shneyder@xxxxxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 17 Nov 2010 17:17:20 +0100
- To: libssh@xxxxxxxxxx
Hello All,
Is that possible to open more as one reverse port forwarding channels in
one ssh session?
For example, I can open two direct tunnels in one session:
channel1=channel_new(session);
channel_open_forward(channel1, "localhost",22, "localhost", localP1);
channel2=channel_new(session);
channel_open_forward(channel2, "localhost",80, "localhost", localP2);
after that I can access both sshd and webd from remote server.
Now I want to open two REVERSE tunnels.
channel_forward_listen(session, NULL, 2222, NULL);
for(;;)
{
channel1=channel_forward_accept(session, timeout);
}
So I can accept all connections on remote server port 2222. But it
seems, I can execute channel_forward_listen on the session only once.
Does it mean, that I must create new ssh session for every reverse
tunnel and there is no way to create several reverse tunnels in one ssh
session?
Thank you,
alex
--
Oleksandr Shneyder
Dipl. Informatik
X2go Core Developer Team
email: oleksandr.shneyder@xxxxxxxxxxxxxxxxx
web: www.obviously-nice.de
--> X2go - everywhere@home
Attachment:
signature.asc
Description: OpenPGP digital signature
Archive administrator: postmaster@lists.cynapses.org