my $sshuser = 'remote_userid'; my $sshpwd = 'remote_passwd'; my $device = 'remote_device'; use MCE::Flow max_workers => 1; use Net::OpenSSH; mce_flow sub { my $wid = MCE->wid; MCE->sendto('stdout', "child($wid): doing ssh\n"); my $ssh = Net::OpenSSH->new( $device, user => $sshuser, passwd => $sshpwd, master_opts => [-o => "StrictHostKeyChecking=no"], master_stderr_discard => 1 ); MCE->sendto('stdout', "child($wid): did ssh - not shown!!! \n"); };