What is correct PEM file format for FreeFileSync?
I tried to do various exports from PuttyGen, including private key, public key, OpenSSH format, SSH.COM format, but neither worked.
Reported error is
LIBSSH2_ERROR_FILE: Unable to extract public key from private key
How to fix? What is correct PEM format FreeFileSync expected?
LIBSSH2_ERROR_FILE: Unable to extract public key from private key
- Posts: 2
- Joined: 30 Jun 2017
- Site Admin
- Posts: 7283
- Joined: 9 Dec 2007
In short: "whatever libssh2" accepts.
Practically the RSA or DSA private SSH keys should work (e.g. as generated by cPanel for web hosting).
If it helps, I'm currently also working on Pageant support as a third way of SFTP authentication.
Practically the RSA or DSA private SSH keys should work (e.g. as generated by cPanel for web hosting).
If it helps, I'm currently also working on Pageant support as a third way of SFTP authentication.
- Posts: 2
- Joined: 30 Jun 2017
- Site Admin
- Posts: 7283
- Joined: 9 Dec 2007
The file format certainly looks correct.
- Posts: 2
- Joined: 23 Jul 2017
Have the same issue...worked once and now I cant get it to work again... not as clued up as dims, but get exactly same error... my public key looks like this...:
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20170801"
***************************************************
***************************************************
***************************************************
***************************************************
***************************************************
********************************************
---- END SSH2 PUBLIC KEY ----
I generated mine with PuttyGen, but presume that's not the issue as it worked once...
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20170801"
***************************************************
***************************************************
***************************************************
***************************************************
***************************************************
********************************************
---- END SSH2 PUBLIC KEY ----
I generated mine with PuttyGen, but presume that's not the issue as it worked once...
- Posts: 2
- Joined: 23 Jul 2017
Strangely pageant worked though... pls explain if you have time
- Posts: 1
- Joined: 15 Jan 2018
I ran into the same error. Fixed it by opening the private ppk key file in PuttyGen and choosing Conversions -> Export OpenSSH key and save the resulting file.