Subject: Re: SSH Port Forwarding Disconnection Issue

Re: SSH Port Forwarding Disconnection Issue

From: Riddhi K <>
Date: Fri, 27 Mar 2020 10:31:50 +0530


Thank you Peter for your suggestions. It will be helpful for me.

Thank You,
Riddhi Kheni.

On Fri, Mar 27, 2020 at 2:48 AM Peter Stuge <> wrote:

> Hi,
> Riddhi K wrote:
> > I am using libssh2 for my iOS SSH Client application. By the reference of
> > direct_tcpip.c and tcpip_forward.c I’ve implemented Local and Remote Port
> > Forwarding. The connection is working fine. But the issue is, after
> loading
> > one request connection terminates automatically.
> ..
> > Is there any solution or any suggestions regarding this issue?
> Those example programs intentionally demonstrate only the minimum that
> is required to forward a single connection through SSH.
> If you want to support multiple connections then you have to write
> the code for that yourself, and to do so you will probably have to
> spend a bit of time on studying that example code, so that you can
> modify it to match your requirement.
> The challenges involved in forwarding multiple connections are nearly
> if not completely unrelated to the SSH forwarding itself, so they are
> not really in scope for libssh2.
> That said, if you can write a minimal example which processes multiple
> forwarded connections, then please do propose it to be added as a
> example in libssh2. Remember to keep the same style as existing code.
> Thanks!
> //Peter
> _______________________________________________
> libssh2-devel

Received on 2020-03-27