When attempting to SSH to the Ops Manager VM, it fails with the following error:
Permission denied (publickey).
This may happen after an upgrade, or during normal operations.
Operations Manager
This error is caused when there is a mismatch between the private key you are using to SSH, and the public key deployed on the Ops Manager VM. First, we will need to validate that the private key being used matches the public key.
To do this:
If the public keys do not match, you will need to generate a new public key from your private key, and set this for Ops Manager to use. Please ensure you have your decryption passphrase for Ops Manager, as you'll need it. To do this:
If the public keys match, then there is likely an issue from the location you're attempting to SSH from. You can attempt to delete the entries from ~/.ssh/known_hosts relating to the Ops Manager, and then try again.
Finally, if all of the above fails, you might need to generate a new public/private key pair entirely. Please refer to this article for steps on doing so: Regenerate and install a new ssh key pair for the Ops Manager VM