Firmware update to Flex System switch failed, indicating an error with the message of "Host Key Authentication failed"

An error message in the jobs log in the format of "IOM: Reported ***ERROR*** Host Key Authentication failed." is seen. This happens when the SFTP key has changed on an SFTP server that was used earlier to update the Flex System switch. The effected switches are CN4093, EN2092, EN4091, EN4093, EN4093R, SI4093.

In Lenovo XClarity Administrator, this error can occur if you have already updated firmware on a Flex System switch, and then you install another later version of XClarity Administrator or reboot XClarity Administrator and subsequently attempt to update the switch. This is because installing a new version of XClarity Administrator or rebooting the XClarity Administrator might cause a new SFTP key to be generated.

To resolve this problem, enter the following command from the CLI for a Flex System switch or a Lenovo Flex System switch to clear the SSH keys. Note that if the switch uses the ISCLI, you must be in the Configuration Terminal mode to run this command. You can change to Configuration Terminal mode by running the enable command, and then the configure terminal command.
clear ssh-clienthostkey all
Note: If the Flex System switch is in IBMNOS CLI mode, enter the following commands from the switch CLI to clear the SSH keys: