How Do I Update the Public Key When a Linux Host Fails to Remotely Log In to the Storage System's BMC System via SSH Due to the Invalid Public Key?
Question
I try to remotely log in to the BMC system of the storage system to be powered on from a Linux host or another storage system via SSH. The system displays a message indicating that the login fails due to the invalid ESDSA host key. How do I update the public key?
Answer
- View the file path of saving the public key from the command output.In this example, the public key is saved in the following path: /xxx/.ssh/known_hosts.
host:~ # ssh admin@xxx.xxx.xxx.xxx @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [MD5]. Please contact your system administrator. Add correct host key in /xxx/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /xxx/.ssh/known_hosts:3 ECDSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking. Host key verification failed.
- Edit the know_hosts file to delete the IP address and public key of the inaccessible storage system.
When you remotely log in to the storage system using SSH next time, a new public key will be generated in the know_hosts file.
- Use SSH to remotely log in to the storage system again.