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.
Convert your key
You can convert your key into a .pem file in Windows or Mac.
Windows – convert a .ppk file to a .pem file
- 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.
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.
- Click Conversions from the menu at the top of the PuTTY Key Generator, and then click Export OpenSSH Key.
- For the PuTTYgen warning 'Are you sure you want to save this key without a passphrase to protect it?', choose Yes.
- Name the file and add the .pem extension.
Mac – convert a .ppk file to a .pem file
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.
Please sign in to leave a comment.