I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-12-05 19:14:49-08 by drfunk
SSH2 0.18 on windows
wrote a little script that connects to a cisco router and runs a command. It works great when I run just one command. Is it possible to run more than one command?
Direct Responses: 9502 | Write a response
Posted on 2008-12-06 02:43:48-08 by luceric in response to 9498
Re: SSH2 0.18 on windows
I am having problem to do the same on Netscaler. May you show me your script. Thanks.
Direct Responses: 9525 | Write a response
Posted on 2008-12-09 21:47:57-08 by drfunk in response to 9502
Re: SSH2 0.18 on windows
#!C:\perl\bin\perl -w use strict; use Net::SSH2; use MIME::Base64; my $user="user1"; my $pass="somepasswd"; my $ssh2 = Net::SSH2->new(); $ssh2->debug(1); $ssh2->connect(host1) or die "Unable to connect host $@ \n"; my $dp=decode_base64("$pass"); $ssh2->auth_password("$user","$dp"); my $chan = $ssh2->channel(); $chan->exec('sh ver'); my $buflen = 30000; my $buf1 = '0' x $buflen; $chan->read($buf1, $buflen); print "BUF1:\n", $buf1,"\nEND BUF1:\n\n"; $chan = $ssh2->channel(); $chan->exec('sh int'); $chan->read($buf1, $buflen); print "BUF2:\n", $buf1,"\n";
Direct Responses: 9542 | Write a response
Posted on 2008-12-13 22:59:39-08 by luceric in response to 9525
Re: SSH2 0.18 on windows
Thanks, the errot that I made was a \n after the command.
Direct Responses: Write a response