The Net::SSH module looks as if it might be useful.
In reply to Re: Using IPC::Run to control ssh client by lachoy in thread Using IPC::Run to control ssh client by eisvogel