#!/usr/bin/perl use strict; use warnings; use Net::SSH::W32Perl; my $host = 'localhost'; my $user = 'user'; my $pass = 'password'; my $cmd = 'perldoc -f getpwuid'; 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;