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

ssh_channel_read seems to randomly close the channel


Hey all!

I’m opening a session and am trying to remote execute a series of command.
For each command, I open a new channel, setting it to be blocking, shoot a remote execute request (which ALWAYS returns successful), and then attempt to read stdout and then stderr.

As I said, the remote_exec for each command seems to ALWAYS be successful, but the ssh_channel_read seems to return -1 randomly on random commands. I can’t make out any patterns on which commands’ read fail and which doesn’t. 

After enabling logging, I see that when the read fails, the channel_open() returns TRUE but then after the ssh_channel_read command that fails, the channel_open() returns FALSE; it looks like the channel_read() command somehow made the channel close itself.

Anyone know why?

-Alex

Archive administrator: postmaster@lists.cynapses.org