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

Re: getting channel errors


)))

i am just trying to implement a tiny c++ wrapper over libssh to
communicate with ssh-server easy through shell. Can't use
channel_request_exec, because i need an interactive input and
different access levels (such "sudo -s" in linux, or "enable" command
in cisco IOS).

On Thu, Feb 11, 2010 at 4:57 PM, Aris Adamantiadis <aris@xxxxxxxxxxxx> wrote:
> Do not hold your breath, it's dangerous :)
>
> Even Guybrush Threepwood after all can do it for 10 minutes at max.
>
> Aris
>
> Stephan Kountso a écrit :
>> thanks, i'll be waiting :)
>>
>> On Thu, Feb 11, 2010 at 4:34 PM, Aris Adamantiadis <aris@xxxxxxxxxxxx> wrote:
>>> Hi
>>>
>>> Stephan's remark is relevant as I'm thinking about a totaly threadsafe
>>> API for 0.5 or 0.5.x and this approach is not fully threadsafe.
>>>
>>> Thanks for pointing this out. But as Vic noticed, care must be taken
>>> when using threading with libssh.
>>>
>>> Regards,
>>>
>>> Aris
>>>
>>> Vic Lee a écrit :
>>>> Hi,
>>>>
>>>> One ssh_session can be used in only one thread, that's the current
>>>> rule. :) I use ssh_select to operate multiple channels in one thread and
>>>> I am good with this approach.
>>>>
>>>> Vic
>>>>
>>>> On Thu, 2010-02-11 at 16:00 +0300, Stephan Kountso wrote:
>>>>> Many of channel_* functions return SSH_ERROR on error. But there is
>>>>> exists only one function to get the reason of any errors:
>>>>> ssh_get_error with only argument "ssh session", not channel.
>>>>>
>>>>> So, my questions are:
>>>>> 1) how to handle ssh channel errors?
>>>>> 2) if also with ssh_get_error, then how about thread-safety? Multiply
>>>>> threads on multiply channels cause corruption on ssh_get_error.
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
>



-- 
С уважением,
Кунцьо Степан aka StepLg

References:
getting channel errorsStephan Kountso <steplg@xxxxxxxxx>
Re: getting channel errorsVic Lee <llyzs@xxxxxxx>
Re: getting channel errorsAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: getting channel errorsStephan Kountso <steplg@xxxxxxxxx>
Re: getting channel errorsAris Adamantiadis <aris@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org