"Permanently added '<fqdn/ip>' (ECDSA) to the list of known hosts….. <fqdn>: Permission denied…
..........
Permanently added '<fqdn/ip>' (RSA) to the list of known hosts….. <fqdn>: Permission denied…
.........
Error: jsch CLI session:
com.jcraft.jsch.JSchException: Auth fail"
...........
Unable to create jsch CLI sesssion:
com.jcraft.jsch.JSchException: reject HostKey: <fqdn/ip>"
VMware Cloud Foundation
The SDDC Manager is expecting RSA whereas Ubuntu is using ECDSA.
The SDDC Manager UI appears to be forcing RSA. Thus using an API as a workaround to use the API call to force ECDSA.
There is Currently no Resolution. It is projected to be fixed in VCF 5.2.
Workaround:
curl 'http://localhost/appliancemanager/ssh/knownHosts' -i -X POST -H 'Content-Type:application/json' -H 'Accept: application/json' -d '{"knownHosts":[{"host":"<backup-server-ip- fqdn>","port":22,"keyType":"ecdsa-sha2-nistp256","key":"<key-from-previous-step>"}]}'
ssh-keygen -lf <(ssh-keyscan -t ssh-rsa 22 <ip-or-fqdn-of-the-server> 2>/dev/null)
{"backupLocations":[{"server":"<backup-server-ip-or-fqdn>","port":22,"protocol":"SFTP","directoryPath":"<directory path>","sshFingerprint":"SHA256:oxND#######jHM","username":"<user>","password":"<password>"}],"encryption":{"passphrase":"<passphrase>"}}