use Net::SSH::Perl; my $user = "testuser"; my $pass = "testpass"; my $ssh = Net::SSH::Perl->new("10.10.10.10"); $ssh->login($user,$pass); $cmd = "getInfo.pl"; ($out, $err, $exit) = $ssh->cmd($cmd); print $out;