Back to product page

PrivateKey property


Holds private key for SSL and SSH authentication.

Type

Object

Syntax

  • C#
  • VB.NET
Object PrivateKey {get; set; };

Property PrivateKey As Object

Remarks

PrivateKey property sets and returns object that represents private key that will be used with authentication. You must setup Authentication property prior to authenticating with your key.

For SFTP protocol:
During connection stage, if wodFtpDLX.NET requires private key to authenticate to the server, it will look in this property and provide public key derived from it to the server. If both keys matches, you will be able to connect just by specifying private key, without any passwords.

For FTPS (or FTPSwithdata/FTPSimplicit) protocols:
wodFtpDLX.NET will check if PrivateKey matches provided Certificate before it tries to connect. If key is valid, it will try to authenticate on SSL level with the server. Usually, if server accepts the authentication, it will not even ask for a password.

wodFtpDLX.NET will in PrivateKey property accept XML string value containing private key data (as returned by ToXmlString method supported by many crypto classes in NET), or AsymmetricAlgorithm class that contains the private key.

Platforms

Windows