When re-configuring NSX to perform backups to use SSH private key based authentication, instead of password based authentication to the SFTP server, the following error is encountered:
Either private key is not valid or public key is not configured on fileserver. (Error code: 29117)
VMware NSX
This error occurs because starting NSX 4.1, RSA is supported for SSH private key generation and the private key currently in use is not in the RSA format and uses the OpenSSH format.
You see the following line at the beginning of the private key: -----BEGIN OPENSSH PRIVATE KEY-----
...instead of the following:-----BEGIN RSA PRIVATE KEY-----
See the following document for more information: Configure Backups
The OpenSSH private key needs to be converted into the RSA private key format to resolve this issue.
Follow these steps to convert your OpenSSH private key to the correct format:
ssh-keygen -p -m PEM -f <location of key>/backup_key-----BEGIN RSA PRIVATE KEY----- and ending with -----END RSA PRIVATE KEY----------BEGIN RSA PRIVATE KEY----- in the file backup_key-----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----# sudo chmod 700<path>/.ssh# sudo chmod 700 <path>/.ssh/authorized_keysNote: The SFTP backup user (used by NSX) must own both.
Additional backup documentation for NSX can be found here: Backing Up and Restoring NSX Manager