Subject: Re: Send custom requests

Re: Send custom requests

From: Mitchell Hashimoto <>
Date: Thu, 15 Mar 2012 09:24:09 -0700


On Tue, Mar 13, 2012 at 4:05 PM, Daniel Stenberg <> wrote:

> On Mon, 12 Mar 2012, Mitchell Hashimoto wrote:
> I'd like to have the option to enable SSH agent forwarding in my app that
>> uses libssh2. Based on this RFC[1] it seems simple enough, but it requires
>> that a send a couple custom SSH request packets. As far as I know, libssh2
>> does not expose a way to send custom request packet types. Would it be okay
>> for this to be exposed?
> Our "normal" approach has been to add API calls for the special packets we
> need so that applications won't need to known and care for SSH related
> binary protocol details. Don't you think that would be better suited for
> this case as well?
> In general I'm not really against a way to send "raw" SSH channel packets
> I'm just not sure people really want to use one.

I agree, but I think having an API for sending a custom
SSH_MSG_CHANNEL_REQUEST packet would be helpful for "advanced" use cases
since it is a core part of the SSH spec, and I believe channels are free to
implement custom requests. I realize not many people build custom channel
types on the remote end, but they're certainly well-within the RFC[1] to do
so. In that case, libssh2 can't possibly handle every possible request
type, so having this raw API would help.

For example, SSH agent forwarding came much later and still as far as I
know doesn't even have a finalized RFC[2]. This added custom REQUESTS. If
libssh2 supported sending custom requests, then users can begin using this
new thing immediately, while custom methods are added which perhaps makes
this easier.

Therefore, I'm saying: Can we do both? I'd happily provide patches for both
cases. :)



> --
> /
> ______________________________**_________________
> libssh2-devel**mailman/listinfo/libssh2-devel<>

Received on 2012-03-15