wodSSHServer ActiveX Control - PrivateKeyData Property
      
 

Description

Holds private key - as byte array.


Property type

An array of Byte values.  


Syntax

object.PrivateKeyData(KeyType ) [= value()]



The PrivateKeyData Property syntax has these parts:

Part Description
object An expression evaluating to an object of type SSHKeyPair.
KeyType Required. A SSHKeyTypes enumeration, as described in settings. Type of the key (RSA or DSA).
value() An array of Byte values.

Settings

The settings for KeyType are:

Constant Value Description
 RSAkey 0 Uses RSA cipher to create keys.
 DSAkey 1 Uses DSA cipher to create keys.

Remarks

PrivateKeyData property is used if you don't want to call internal Load and Save methods to preserve key data between wodSSHD sessions.  Once you Generate new key, you can retrieve it's raw data using this property (or PrivateKey property), and store it somewhere depending what your needs are. Obtaining private key data this way does not encrypt it in any way - you should do it by yourself when you store the key.

In later sessions, you can easily load your key internally, and put it in PrivateKeyData property and wodSSHD will immediately be able to use it. KeyType must be specified to determine what key is stored/retrieved.

Note that setting PrivateKeyData with unexpected data may result in wodSSHD rejecting your key. It is advised to set PrivateKeyData only with data you have previously retrieved from the same property (in previous session).