While importing the vCenter to the SDDC Manager via Cli the task fails with below error.
[YYYY-MM-DD HH:MM:SS] [ERROR] trust_domain: Declined trust for Fully Qualified Domain Name (FQDN)[YYYY-MM-DD HH:MM:SS] [CRITICAL] discover domain: Aborting operation as SSH keys have been rejected by the user. Operation can be retried with the same command line arguments.
example.
SDDC 5.x
vCenter 8.x
SDDC is trying to establish a secure connection, but it’s hitting a wall because the identity of the remote server (the FQDN) isn't trusted, and the SSH keys were subsequently bounced.
Download the Script fix_known_hosts.sh.
How to update the SSH host keys on the SDDC Manager
Note: fix_known_hosts.sh does not work in a FIPS enabled environment.
fix_known_hosts.sh script attached to the KB:chmod +x /tmp/fix_known_hosts.sh./fix_known_hosts.shNOTE: If you run in to permission issue like below.
root@ESXi [ /tmp ]# ./fix_known_hosts.sh bash: ./fix_known_hosts.sh: Permission denied
Use the command:sh ./fix_known_hosts.sh
Refence Article.