use strict; use warnings; use Net::SSH::W32Perl; 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, protocol => 2); $ssh->login($user, $pass); my @sV= $ssh->cmd($cmd); .... .... .... $ssh->close();