Probably a bug on your DUT as iTest uses a standard Java SSH session
As a workaround:
a) Increase the time between commands ( you can also do this on the session)
2) You can trap the OnTerminalConnClosedWaitingForResponse event and add a call to the procedure to reopen the session.
If you are testing the device whose software is built by development team in your company, I would recommend to not work around this issue and get your developers to fix this bug. Imagine if your customers are getting their SSH session killed because the device is flaky.
If you are testing the device which you have bought from other company, then you can override this event and take appropriate actions based on your needs. But even in this case, I would file a bug with this company.
One last thing - "exit" and "logout" commands will generate OnTerminalConnClosedWaitingForResponse. This is perfectly normal because iTest will send logout command and then wait for the prompt. While it is waiting for the prompt, server will close the connection. This is the reason why this event has no actions by default.
It sounds like your SSH server is closing the connection for some reason. Are you talking directly to a device? Or are you talking to a terminal server or some intermediary device?
To troubleshoot this, I would use wireshark and watch the packets as they go back and forth. At some point, I assume you'll see the server sending a packet to close the TCP socket. Whatever is happening around that point might give you a clue.
No one has followed this question yet.