use strict; use warnings; use Net::SSH::Perl; my $host = shift @ARGV; my $user = shift @ARGV; my $pass = shift @ARGV; my $cmd = shift @ARGV; my $ssh = Net::SSH::Perl->new($host, debug => 1); $ssh->login($user, $pass); my @sV= $ssh->cmd($cmd); .... .... .... $ssh->close();