in reply to
Script hangs when executing command over ssh
That looks like a Net::SSH::Perl Bug. 30k is quite suspecting, the max size of a SSH packet.
You should try using
Net::OpenSSH
instead.
Comment on
Re: Script hangs when executing command over ssh
In Section
Seekers of Perl Wisdom