[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ssh_channel_read seems to randomly close the channel
[Thread Prev] | [Thread Next]
- Subject: ssh_channel_read seems to randomly close the channel
- From: Alex Zhang <zhang.sb.2009@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sun, 26 May 2019 17:08:46 -0700
- To: libssh@xxxxxxxxxx
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
Re: ssh_channel_read seems to randomly close the channel | g4-lisz@xxxxxxxxxxxx |