Thread::Queue may be a good choice as sharing data between threads is easier than between processes but you will have to check that Net::SSH::Perl and its dependencies are thread safe.
In any case, I am not an expert in that area, you will probably get better answers if you post a new question.