Subject: Reverse port forward using libssh2

Reverse port forward using libssh2

From: Ralph <>
Date: Tue, 23 Aug 2011 11:34:24 -0400

Hi folks,

I'm trying to do a reverse port forward on iOS using libssh2. Here's
the bulk of my code:

(do you guys like pastebin? I feel blad flooding the email)

The connection is done previously, and completes correctly (as far the
return code suggests).

The listener fails:

   listener = libssh2_channel_forward_listen_ex(session,

where lhost is, _lport is 8080, rport is some high port and

The error was: "Unable to complete request for forward-listen".
Googling this doesn't give much insight, though it seems to come
internally from a SSH_MSG_REQUEST_FAILURE.

I've tested the ssh server with the same port, and it works on the
command line with "ssh -R ..." so I'm almost positive I'm missing
something in my code...

Any help would be greatly appreciated! I plan on adding this to the
examples when finished. I can share a larger example if needed too!

Received on 2011-08-23