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

How do you turn off SSH key checking with NCM backups

book

Article ID: 5255

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

How do you turn off SSH key checking with NCM backups

Environment

Release: All
Component:

Cause

When customers need to turn off SSH key checking for NCM backups. 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 spectrum server 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'
                                      );