Replacing bash ssh calls to the Net::SSH library.  

I tested this and it works.