#!/usr/bin/perl -l use strict; use warnings; use Net::SSH::Perl; my $host = 'xl-blr-03.ban'; my $user = 'mcsi_user'; my $password = 'password'; my $cmd = system("kill 0 28075; echo $?"); my $ssh = Net::SSH::Perl->new($host, debug => 1); $ssh->login($user, $password); my($stdout, $stderr, $exit) = $ssh->cmd($cmd);