EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSSHKey.LoadPrivateKey Failure

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#37233
Posted: 07/11/2016 09:09:57
by Aarron Shaughnessy (Standard support level)
Joined: 11/11/2011
Posts: 14

SBBs SFTP Client does not appear to like using Linux generated private key files used for SFTP Authentication as it doesn't appear to handle PEM files generated by sshkeygen on Linux. SO I swapped to letting SBB generate its own files....

Code
GenerateKeyPair(String PublicKeyFile, String PrivateKeyFile, String PassPhrase) {
  TElSSHKey key = new TElSSHKey();
  key.Generate(SBSSHKeyStorage.Unit.ALGORITHM_RSA, 2048);
  key.SavePublicKey(PublicKeyFile);
  key.SavePrivateKey(PrivateKeyFile, PassPhrase);
}


This works great. With the public key concatenated into my AuthorisedKeys file on Linux and CoreFTP using the private key, passwordless login works just fine.

Unfortunately I then try to use the private key file with a TElSimpleSFTPClient. However this fails at the first hurdle as TElSSHKey fails to load the key back in from its own key file:

Code
  TElSSHKey newkey = new TElSSHKey();
  newkey.LoadPrivateKey(PrivateKeyFile, PassPhrase);



Failure 3330 - SBSSHKeyStorage.Unit.SB_ERROR_SSH_KEYS_INVALID_PRIVATE_KEY.

How can your own generated key be invalid ? As it happens the public key would load fine, but the private key that I need does not.

Any help appreciated
#37234
Posted: 07/11/2016 09:13:04
by Eugene Mayevski (EldoS Corp.)

I’ve noticed there is no Support Access Ticket linked to your user account on EldoS site. Technical Support is provided to customers with the linked Support Access Ticket. You will find your Support Access Ticket together with all the details about how to use it in the registration e-mail that we’ve sent to you upon the purchase.

If you are evaluating the product and don't have a license yet, please let us know and then you can have support according to Basic support level. Basic support level includes answering basic technical questions that appear during product evaluation period. We also offer Premium support for a purchase from https://www.eldos.com/support/calc.php . You can use Premium Support to get higher level of assistance during your evaluation of our products.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 543 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!