http://www.perlmonks.org?node_id=950081


in reply to Re: Is Net::SSH::Expect a thread-safe module?
in thread Is Net::SSH::Expect a thread-safe module?

In my experience it is never safe to use threads (or forks) with any form of SSH if you plan to create a connection before creating child threads, and then using that connection in multiple children.

Net::OpenSSH supports sharing the connection between different threads or processes.