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

Fwd: C++ libssh function “ssh_channel_read()” is not working for storing bulk ssh output


   Dear All,


I am trying to build a web based application which collect parameters from
web console and use c++ libssh to ssh to servers and collect information.I
have to collect around 6000 characters from the ssh output but i see that
my buffer is not storing entire output it is not collecting anything after
2800 characters,unfortunatly i need collect entire output to determine if
the excuction is sucessful or not. Please find the code below.

char buff[6000];unsigned int
nbytes; rc = ssh_channel_request_exec(channel,fws);
sleep(60); //It wait 60 seconds to collect all the output
nbytes = ssh_channel_read_nonblocking(channel,buff,sizeof(buff),1);

Thanks a lot for your help in advance.

Thanks

Sree

Archive administrator: postmaster@lists.cynapses.org