in reply to Using IPC::Run to control ssh client
The Net::SSH module looks as if it might be useful.