Page 1 of 1

Private key with passphrase

Posted: Tue 20 Nov 2012 19:00
by coolsmurf
Hi,

I have a private key encrypted with a passphrase. I want to use it to connect to the SSH server. To open the Key, I use the ImportFrom() method.

Code: Select all

TScKey* myKey = new TScKey(myFileStorage->Keys);
K->KeyName = "myKeyName";
K->ImportFrom("myEncryptedKey.ssl", "myPassword");
However, it seems that the TFileStorage component saves the uncrypted key in a file "myKeyName.key". Can I stop him from doing that ? All I want is to open my connection with the server. I don't want the key to be stored uncrypted like this on the computer. Is there a solution ?

Thanks in advance,

Re: Private key with passphrase

Posted: Tue 05 Feb 2013 13:19
by Dimon
To solve the problem, set the TScFileStorage.Password property to any nonempty password.