NCM custom Perl script - Login has failed. Didn't see device prompt as expected

book

Article ID: 224152

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

We have a problem with the NCM module, we cannot bring the configuration of the devices because the script does not seem to be able to connect with the devices (If you have ssh enabled and the connection works manually), the error is the following:

We found the following in the Perl script debug file:

=====================
>> Ssh_CISCO_capture_running.pl:118:     if( [email protected] )
>> Ssh_CISCO_capture_running.pl:125:     if( $login_output !~ /\#\s*\z/ )
>> Ssh_CISCO_capture_running.pl:127:         $msg = "Login has failed. Didn't see device prompt as expected.";
>> Ssh_CISCO_capture_running.pl:128:         $ssh->close();
=====================

Environment

Release : 10.4.1

Component : Spectrum Applications

Resolution

Modified the custom Ssh_CISCO_capture_running.pl script file as follows (replace the yellow lines by the green ones ):

    # login output should contain the right prompt characters
    # if( $login_output !~ /\#\s*\z/ )
    if( $login_output !~ /#/ )   
    {
        $msg = "Login has failed. Didn't see device prompt as expected.";
        $ssh->close();
        # return( 252, $msg );
        return( 252, $login_output );
    }

Attachments