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

Re: Requesting agent forwarding


Andreas,

On Fri, Apr 20, 2012 at 12:37 AM, Andreas Schneider <asn@xxxxxxxxxxxxxx> wrote:
> On Thursday 19 April 2012 14:19:18 you wrote:
>> Sorry about the new thread, I was subscribed to the "nomail" version
>> of the mailing list without realizing it so I couldn't figure out a
>> way to respond to the previous response. I'm responding to Andreas
>>
>> below:
>> >> I'm investigating libssh for a project and one of the requirements is
>> >> that I'm able to request SSH agent forwarding on an SSH connection. It
>> >> appears based on the RFC[1] that this is done by sending a channel
>> >> request. I don't see if this is done or exposed anywhere in libssh.
>> >>
>> >> Is this possible now?
>> >
>> > it is possilble to implement it, but we don't have a simple API for it.
>>
>> Yeah I can see how it can easily be implemented in libssh. Would this
>> be something you'd be interested in a patch?
>
> A patch would be great, it needs to be in #ifndef _WIN32 cause windows doesn't
> support unix sockets.

Hm, I don't think this is necessary. Windows should be able to forward
agent just as well, shouldn't it? I thought that it just required a
request over the channel, which caused a ssh-agent daemon to start on
the remote end. Unix sockets vs windows sockets shouldn't change,
should it?

I currently use a pure-Ruby SSH library that allows for forwarding on
Windows, and this will be a requirement for the switch to libssh, so
it is important that this actually works on Windows.

>
>>
>> > What you are doing on the client side is to connect to the socket of the
>> > unix socket from the agent and "forward" the request over a ssh channel.
>> > The server sets up a unix socket and set the evironment variable for the
>> > unix socket so the clients on the server know where the agent is.
>>
>> Right, so there is no way to do this with libssh currently without patching
>> it?
>
> You can do it without changing libssh. All the functions should be there. A
> patch for libssh adding it with and easy to use interface is welcome.

It looks like the function I'd need to call is a file-local (static)
function, so I can't actually call it external. The function I would
need specifically is `channel_request`.

What functions were you thinking?

Best,
Mitchell

>
>
>        -- andreas
>
> --
> Andreas Schneider                   GPG-ID: F33E3FC6
> www.cryptomilk.org                asn@xxxxxxxxxxxxxx
>
>

Follow-Ups:
Re: Requesting agent forwardingAndreas Schneider <asn@xxxxxxxxxxxxxx>
References:
Re: Requesting agent forwardingMitchell Hashimoto <mitchell.hashimoto@xxxxxxxxx>
Re: Requesting agent forwardingAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org