in reply to Re: Re: Program hangs
in thread Program hangs

What does the other machine (the receiver) think is happening? Are the commands being passed down a constantly-open channel which is getting clobbered by an intervening firewall after a certain length of time?

Oh, and if this is on Linux, cat /proc/sys/fs/file-nr while the program is hung. You may have run out of filehandles (although you'll have a hard time launching a shell etc. if that's the case).