How do you turn off SSH key checking with NCM backups
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 certificate. Then it will backup.
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.