Resolving the error : Error in establishing sftp connection. Reason: invalid privatekey

Resolving the error : Error in establishing sftp connection. Reason: invalid privatekey

book

Article ID: KB0071674

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for sFTP 1.1.x, 6.1.3, 6.1.4

Description

While testing the sftp connection with private key authentication, attached error may occur -
SFTP Connection Test Failed. Error: Error in establishing sftp connection. Reason: invalid privatekey: [random.

Issue/Introduction

Solving Invalid Private key errors while testing an sFTP connection with a private key authentication

Resolution

This error occurs due to the sFTP plugin supporting PPK2 or lower file formats for a private key.
This issue can be resolved by -
Using PPK2 format for private keys.

If generating private keys using PuTTYgen, use either version 0.74 or below. If using 0.75 or above versions, convert the generated PPK3 format to PPK2 format using the below steps- 

a. Open putty gen 0.75 or above & import the private key file. Click File -> Load private key. Provide the private key generated(PPK3).

b. After import, go to Menu option KEY then select the option: Parameters for saving key files...
Here PPK version would be 3 by default. Change it to 2

c. Then go to the Conversion Menu option & select the Export OpenSSH Key option.
On clicking it will ask for saving the Private key file. Save this as a new private key and then test the designer connection by providing this new key.

Note: Public Key file will remain the same in both PPK2 and PPK3 formats (No changes are required nor a need to transfer the public key again to the server)

 

Attachments

Resolving the error : Error in establishing sftp connection. Reason: invalid privatekey get_app
Resolving the error : Error in establishing sftp connection. Reason: invalid privatekey get_app
Resolving the error : Error in establishing sftp connection. Reason: invalid privatekey get_app