use Net::OpenSSH; my $ssh = Net::OpenSSH->new($host, user => $InboundParameters[3], password => $InboundParameters[4]); # then from the threads call... sub sftp_task { my $sftp = $ssh->sftp; $sftp->mkdir("ftp2SAT5"); ... }