|
install Net::Appliance::Session
try this code it works fine
#!/usr/bin/perl
use strict;
use Net::Appliance::Session;
my $host = "nxxxxx";
my $user = "xxxxx";
my $pw = "xxxxx";
my $s = Net::Appliance::Session-<new( Host =< $host, Transport =< 'SSH', );
$s-<connect( Name =< $user, Password =< $pw );
print $s-<cmd('show version');
print "*******************************************\n";
#$s-<do_configure_mode;
$s-<begin_configure;
print $s-<cmd('no access-list 50 permit x.x.x.x');
$s-<end_configure;
print $s-<cmd('show running-config');
print "*******************************************\n";
$s-<close;
|