in reply to Net::SSH2 Question - again-

Check out Re: Net::SSH2 Interactive command example by zentara.

Update: shmem wrote one that seems closer to what you are trying to do: Re: Net::SSH2 Interactive command example