Sidebar

How do I SFTP a file using an RSA key (certificate) without a password?

0 votes
2.9K views
asked Aug 29, 2016 by ben-s-7515 (12,320 points)
edited Sep 13, 2016 by brandon-w-8204
I have an endpoint that requires an SFTP with RSA key and no password.  Currently we use putty to upload to this endpoint.  Is it possible for QIE to upload using an RSA key and no password?

1 Answer

0 votes

Note: OPENSSH keys required from puttyGen. RSA key is required. Use the export OpenSSH key from the conversions menu.

To upload a file using an RSA key and no password you will need to get a .ppk RSA key formatted in the PuTTYgen format.  If no password is assigned to the ppk just leave the password blank.

privateKeyPassphrase=

If you receive an RSA key that is not in the puttyGen format, you will need to import it into PuTTYgen and assign a password and then export it.  PuTTYgen can be downloaded from the PuTTY download page.

To import a key into PuTTYgen, you will run the application, select "Load", browse to the key file, and then select "Open".  Once it is loaded you can set the password, then select "Save private key".  This will export the key with a password in the correct format.

Inside QIE, you will select the destination that you would like to configure.  Change the type to "FTP", set your host and port (the default port for SFTP is 22).  You will leave the Protocol set to "FTP - SSH File Transfer Protocol".  Set the username, but leave the password blank.  You will need to select "Custom Apache Camel parameters" and set the following two parameters:

privateKeyFile={pathToPrivateKeyFile}
privateKeyPassphrase={keyPassword}

The destination endpoint should look something like:

At this point you can test your connection and validate the file was uploaded correctly.

Note: If running the service as a named user you will need to add the following:

preferredAuthentications=publickey

answered Aug 29, 2016 by ben-s-7515 (12,320 points)
edited Dec 30, 2021 by brandon-w-8204
commented Mar 31, 2020 by shamon-l-7513 (150 points)
reshown Sep 18, 2020 by brandon-w-8204
1) This latest answer is a few years old. With the latest version of QIE, will I still need to assign a password to the PPK file using PuTTYgen?

2) I was not given a username with my PPK file. Can I use this procedure without supplying a username?
commented Sep 18, 2020 by brandon-w-8204 (33,170 points)
No password is required. The answer above has been updated.
commented Apr 6, 2022 by steven-f-7084 (100 points)
Just a little note:  If you have Qvera installed on a Linux server, you have to store the keys on the Linux server - privateKeyFile=/home/user/keys/Key_file_Openssh.ppk
It will not work to point to a key file on a local Windows system using c:\keyfolder\Key_file_Openssh.ppk
...