use Net::OpenSSH; my $host = 'server'; my $userid = 'userid'; my $pass = 'password'; my $ssh = Net::OpenSSH->new('$host');