#!/usr/bin/perl use warnings; use strict; use Net::SSH2; my $nasip= "127.0.0.1"; my $username = "username"; my $password = "password"; my $ssh2 = Net::SSH2->new(); $ssh2->connect("$nasip") || die "Cant connect to $nasip - $!"; $ssh2->auth_password("$username","$password") || die "Username/Password not right"; my $chan = $ssh2->channel(); $chan->blocking(0); sleep 10; $chan->exec('nas_server -list') or die "Cannot run the command - $!.$^E."; print while (<$chan>); #### C:\plscripts>perl newmon.pl Cannot run the command - .A non-blocking socket operation could not be completed immediately. at newmon.pl line 16. #### use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";