in reply to NET::SSH2 Terminates

Have you tried $chan2->blocking(1); ?

With blocking turned off my (Windows) client often gets nothing back form a local (Linux) server - but with blocking turned on it all works reliably.

With blocking turned off, it's an "all or nothing" situation for me. I don't get the "partial" returns that you do, so maybe it's an entirely different problem that confronts you (with an entirely different solution :-)

Cheers,
Rob