arwillia has asked for the wisdom of the Perl Monks concerning the following question:
Winodws 2008 64-bit running Strawberry Perl connecting to SuSe Linux 11 I can not get past this error Can't call method "blocking " on an undifined vaule Any method call is not working eg exec..etc
#!D:\SupportTools\perl\perl\bin\perl -w use strict; use Net::SSH2; use MIME::Base64; my $ssh2 = Net::SSH2->new(); $ssh2->connect("servername") or die "Unable to connect host $@ \n"; $ssh2->auth_password('user','passwd'); my $chan = $ssh2->channel(); $chan->blocking(); $chan->exec('ls'); my $buflen = 10000; my $buf1 = '0' x $buflen; $chan->read($buf1, $buflen); #print "BUF1:\n", $buf1,"\n"; $chan->exec('exit'); $ssh2->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bangging head against desk
by Khen1950fx (Canon) on Jan 18, 2012 at 02:20 UTC | |
|
Re: Bangging head against desk
by choroba (Cardinal) on Jan 18, 2012 at 17:04 UTC |