[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SSH Tunnels


On Wednesday 12 February 2014 13:27:46 Loïc Michaux wrote:
> Hi,

Hey,

> I am currently trying to implement tunnels via ssh forwardings and libssh
> callbacks system.
> 
> Some questions where posted here about this kind of problem but I couldn't
> find any detailed answer.
> 
> When trying to open tunnels with `ssh -p <port> -ND <lport>
> <user>@<server_addr>` (or any other set of options which asks for tunnels),
> no callback is triggered in order to handle this.
> 
> I supposed at least channel_open_request_session_function() or
> global_request_function() had to be called with a SSH_REQUEST_GLOBAL
> request type or a SSH_CHANNEL_FORWARDED_TCPIP channel type, but this is not
> what actually happens.
> 
> Did I miss something ? A callback specially created for this use ?
> Or do I have to patch the lib to create one or more callbacks which will be
> triggered by ssh_execute_server_request() in src/messages.c ?

this is not the callback way how libssh server should be implemented. See

http://git.libssh.org/projects/libssh.git/tree/examples/ssh_server_fork.c


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


Follow-Ups:
Re: SSH TunnelsLoïc Michaux <lmichaux@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org