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

Re: Execution of invalid command doesn't return error


In function "int channel_read_buffer (ssh_channel channel, ssh_buffer
buffer, uint32_t count, int is_stderr)" you need to pass 1 in place of
is_stderr to read from stderr. Now you probably pass 0, thus you read from
stdout. You need to read stdout and stderr separately.

FJ

pt., 22 mar 2019, 12:12 użytkownik BharathiNandhan Ranganathan <
bharathiR@xxxxxxxxxxxxx> napisał:

> Hello,
>
>
>
>      I working on GUI application and have been using libssh for a month
> now. As per online documentation I tried executing command through “
> ssh_channel_request_exec” function. It worked well when passed with valid
> command’s.
>
>      When the function is executed with invalid commands such as “lsls
> -l”, it doesn’t capture/return error.
>
>      Please let me know if am missing anything. The libssh version am
> working with is 0.7.6 under windows environment.
>
>
>
> Regards,
>
> Bharathinandhan R
>
>
>

Follow-Ups:
RE: Execution of invalid command doesn't return errorBharathiNandhan Ranganathan <bharathiR@xxxxxxxxxxxxx>
References:
Execution of invalid command doesn't return errorBharathiNandhan Ranganathan <bharathiR@xxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org