In any case, as you seem to be on a Linux/Unix box, consider also using Net::OpenSSH instead.
In reply to Re: Net::SSH2 limitation? by salva in thread Net::SSH2 limitation? by bbarrette