Hi, I am completely new to perl and need to write a script which will login to a router and execute few commands. Below is my code and I am getting a error as "Can't find @INC Net::SSH::Perl" I have also tried with Net::SSH and getting the same error. I have tried installing it all the ways but failed. Don't even know where I am going wrong. Please help.
#!/usr/bin/perl -w use strict; use lib qw("/path/to/module/"); use Net::SSH::Perl; my $hostname = "hostname"; my $username = "username"; my $password = "password"; my $cmd = shift; my $ssh = Net::SSH::Perl->new("$hostname", debug=>0); $ssh->login("$username","$password"); my ($stdout,$stderr,$exit) = $ssh->cmd("$cmd"); print $stdout;
In reply to Perl script on networks. by supriyas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |