You can authenticate your FTP connection using SFTP protocol by providing your username and an Authentication key (.pem file format). If this authentication key is incorrect or in .ppk format, it will result in the following error:
[Could not connect to SFTP server at "sftp://<URL>:***@sftp01.<website>.com/".] [Could not load private key from "/<folder>/<folder>/<folder/<filekey>".] [invalid privatekey: [<private key>]
You can see that the URL could not load the private key from its designated location and the key was invalid.
You can convert your key into a .pem file in Windows or Mac.
-
Start PuTTYgen
-
Under Actions, choose Load, and then navigate to your .ppk file.
-
Choose the .ppk file, and then choose Open.
-
Clear the 'Key passphrase' and 'Confirm passphrase' fields.
-
For the PuTTYgen warning 'Are you sure you want to save this key without a passphrase to protect it?', choose Yes.
Note
The passphrase is used to encrypt the key and is an extra layer of protection. If your private key is discovered, it can't be used, because the passphrase is required to log in. Using a passphrase makes automation difficult because human intervention is needed to log in to an instance, or copy files to an instance.
-
Name the file and add the .pem extension.
Follow the steps in this article to convert a .ppk file to a .pem file.
Note
Before using the private keys in the authentication field, verify that your FTP server settings are configured correctly for the RSA public key.