Mitchell Hashimoto | 13 Mar 01:05 2012
Picon

Send custom requests

Hello,


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?

Best,
Mitchell


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Daniel Stenberg | 14 Mar 00:05 2012
Picon

Re: Send custom requests

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.

--

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Mitchell Hashimoto | 15 Mar 17:24 2012
Picon

Re: Send custom requests

Daniel,

On Tue, Mar 13, 2012 at 4:05 PM, Daniel Stenberg <daniel-7AX/Qt632QQ@public.gmane.org> 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. :)

Mitchell

 


--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Peter Stuge | 15 Mar 17:32 2012
Picon

Re: Send custom requests

Mitchell Hashimoto wrote:
> Can we do both?

Not for no reason. Do the agent API. Let's look at something more
generic when there is actual need.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Gmane