How do you turn off SSH key checking with NCM backups in Spectrum?
search cancel

How do you turn off SSH key checking with NCM backups in Spectrum?

book

Article ID: 5255

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

How do you turn off SSH key checking in Spectrum when customers need to turn it off for NCM backups after a certificate change?

Environment

DX NetOps Spectrum all currently supported releases

Cause

The code doesn't work if you change the certificate. It will not backup, you get a login failure. You then have to login into the SpectroSERVER and login to the bash shell then use "ssh-keygen -R x.x.x.x" to delete the old cached SSH Key. Then it will backup. 

Resolution

Use "-o UserKnownHostsFile=/dev/null" along with "-o StrictHostKeyChecking=no" as below:

my $ssh = Net::SSH::Expect->new ( host => $deviceIP, user => $user, password=> $pass, raw_pty => 1, no_terminal => 1, timeout => $login_timeout, ssh_option => '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' );

This will allow the capture to complete successfully.

Additional Information

Example

my $ssh = Net::SSH::Expect->new ( host => $deviceIP,
                                        user => $user,
                                        password=> $pass,
                                        raw_pty => 1,
                                        no_terminal => 0,
                                        timeout => $login_timeout,
                                        ssh_option => '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
                                      );