#!/usr/bin/perl use strict; use warnings; use Net::SSH::W32Perl; my $host = 'host'; my $user = 'user'; my $pass = 'password'; my $cmd = 'ls'; my $ssh = Net::SSH::W32Perl->new( $host, debug => 1, protocol => 2 ); $ssh->login($user, $pass); my ($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout, "\n"; exit;