Re: [Ssh-sftp-perl-users] Anyone have an example of SSH2 to Cisco?
Brought to you by:
dbrobins
From: Matthew J. S. <vag...@ya...> - 2006-05-15 19:27:21
|
--- Mark Funk <mf...@tr...> wrote: > sub ssh2_cisco { > > my $ssh2 = Net::SSH2->new(); > > $ssh2->connect("$host1") or warn "Can't open > connection to $host1\n"; > > $ssh2->auth_password($user1, $pass1); > > my $chan = $ssh2->channel(); > > #$chan->pty('terminal'); > > $ssh2->exec('sh ver'); > > } > > > > root@tcpsyslog:/usr/local/scripts# ./ssh2.pl > > exec is not a valid Net::SSH2 macro at ./ssh2.pl > line 44 > > root@tcpsyslog:/usr/local/scripts# > > > > > > Thanks, Did you read the error message or just post it? "exec is not a valid Net::SSH2 macro at ./ssh2.pl line 44" Read the docs. There is no reference to exec. Your e-mail is not even asking a question! http://search.cpan.org/~dbrobins/Net-SSH-Perl-1.30/lib/Net/SSH/Perl.pm Look at the given example. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |