Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Client.SSH
- Methods
- Properties
- AllocatePty
- Authentication
- Blocking
- Columns
- Command
- Compression
- DataOut
- DataReady
- Encryption
- EncryptionList
- ExitSignal
- ExitStatus
- FingerPrintType
- FIPS
- ForwardHost
- ForwardPort
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeyFowarding
- Login
- Password
- Port
- PrivateKey
- Prompt
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- Rows
- ShowStdErrorMessages
- State
- StripANSI
- Subsystem
- TerminalType
- Timeout
- Version
- Events
- How to get support?
PrivateKey property
Private key for authentication.
Type
Byte[]. Value that represents your private key, rather than password.Syntax
- C#
- VB.NET
Byte[] PrivateKey {get; set; };
Property PrivateKey As Byte[]
Remarks
PrivateKey property sets and returns byte array that represents private key that will be used with authentication. You can get reference to private key either from our KeyManager component, or by loading it directly from disk where it should be saved in raw format. You must setup Authentication property prior to authenticating with your key. During connection stage, if wodSSH.NET requires private key to authenticate to the server, it will look in this property and pass 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.You should use our KeyManager component to load keys from the disk, and pass them here as a byte array. Or, you can just load it from the disk, convert to byte array, and pass to PrivateKey property. When loaded from the disk using your own method, it should be loaded from raw pool, as provided by KeyManager.PrivateKey property.