Hallo,
does anybody know how to connect to an ERS 4XXX 5XXX with a perl script by using SSH?
The Task is to change Passwords for Cli and snmpv3 phrases on a bundle of devices. There are a lot of scripts for Cisco with the Module Net::Appliance::Session. When i try a script with this modul ist works (ssh session opens username and password will be transmitted) but how do i get "ctrl+y" in the session, i think if i get a prompt everything is fine and i can use this script like on a cisco machine (i tested another script on some cisco machines).
#!/usr/bin/perl
use warnings;
use Net::Appliance::Session;
my $ios_device_ip = 'deviceIP';
my $ios_username = 'username';
my $ios_password = 'password';
my $ios_enable_password = 'cisco';
#my $running_config_file = "$ENV{HOME}/running_config.txt";
my $session_obj = Net::Appliance::Session->new({
personality => 'nortel',
Host => $ios_device_ip,
Transport => 'SSH',
});
# give verbose output whilst we run this script
$session_obj->input_log(*STDOUT);
$session_obj->connect(
Name => $ios_username,
Password => $ios_password
);
sleep 1;
#Crtl+Y, but it will not work
print $session_obj->cmd(String => '\cY');
sleep 1;
$session_obj->close;
cheers