Clear the SSH known_hosts file automatically

Idea created by lilah on Aug 17, 2016
    • JonV
    • Frank_Elliger
    • DaveJanes4204602
    • D.Bauer
    • lilah

    Hi everyone,


    When using custom capture scripts for NCM, after each SSH connection the known_hosts file (located on the Assurance server) is updated with the public key of the device. Should that public key of that IP address change over time (for example the device has been replaced), the NCM task will fail for that device.


    I received the following error within the NCM task when this issue occurred: "Login Error: Use of uninitialized value in concatenation (.) or string at ..." which wasn't pointing me in the right direction.


    Assuming no solution is currently in place for NCM, I'd like to propose clearing the known_hosts file automatically or handle such key changes more gracefully. At present I had to clear this file myself in order to allow several objects to once again operate with NCM.


    Any thoughts?