#!/usr/bin/perl use warnings; use strict; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new("A.B.C.D",        port => "22",        debug => "1",        interactive => "0",        options => [                "BatchMode 1"                ]        ); $ssh->login('user','password'); my($out,$err,$exit) = $ssh->cmd("uname -a"); print "$out\n";