#!/usr/bin/perl use Net::SSH::Perl; my $host = 'xl-blr-03.ban'; my $user = 'mcsi_user'; my $password = 'password'; #-- set up a new connection my $ssh = Net::SSH::Perl->new($host); #-- authenticate $ssh->login($user, $password); #-- execute the command my($stdout, $stderr, $exit) = $ssh->cmd("kill -0 28075 ; echo $?"); print " Output is $stdout \n";