Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSSHD
- Methods
- Properties
- Events
- Connecting
- CryptoInformation
- Disconnected
- LoginGSSAPI
- LoginPassword
- LoginPubkey
- PortBindRequest
- PortForwardConnect
- PortForwardDisconnect
- PortForwardRequest
- Received
- ServiceRequest
- ServiceStart
- SftpDeleteFile
- SftpDownloadFile
- SftpFileTransferData
- SftpListDir
- SftpListDirData
- SftpMakeDir
- SftpProgress
- SftpRemoveDir
- SftpRename
- SftpTransferComplete
- SftpUploadFile
- StateChanged
- IwodSSHDNotify
- Methods
- Connecting
- CryptoInformation
- Disconnected
- LoginGSSAPI
- LoginPassword
- LoginPubkey
- PortBindRequest
- PortForwardConnect
- PortForwardDisconnect
- PortForwardRequest
- Received
- ServiceRequest
- ServiceStart
- SftpDeleteFile
- SftpDownloadFile
- SftpFileTransferData
- SftpListDir
- SftpListDirData
- SftpMakeDir
- SftpProgress
- SftpRemoveDir
- SftpRename
- SftpTransferComplete
- SftpUploadFile
- StateChanged
- Methods
- SSHKeyPair
- SSHUser
- SSHUsers
- How to get support
- Technical information
- Fast notifications
- Error list
Load method
Loads keys from the file.
Syntax
- Basic
object.Load Filename, (Password)
The Load(object,FIlename,Password) syntax has these parts:
The Load(object,FIlename,Password) syntax has these parts:
object | An expression evaluating to an object of type SSHKeyPair. |
FIlename | Required. A String value. Full path to file where key is saved. |
Password | Optional. A Variant value. Secret password that was used to protect the key. |
Remarks
Load method will try to load in memory previously saved key using Save method, or saved using external programs such as ssh-keygen included in OpenSSH package. File should be accessible and readable by yourself (and thus the server) in a time when Load is requested.If Load is successful, wodSSHD will recognize key type (RSAkey, DSAkey or ECDSAkey) and overwrite old one from memory (if any). If you use multiple keys for your server, you should call Load method more than once, specifying different file in each call.
Saved key should be in PEM format. PEM format is simply base64 encoded data surrounded by header lines (this is the format that is used in Save method) and is widely supported by different SSH implementations. Load additionally transparently handle PKCS#8 format encrypted and unencrypted keys too. Typical structure looks like this (for RSAKey):
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CFB,33E78EDBC3F91072
bKxPNDjHoqW4wT46OnYnDWtJnhwhqRIh81o9IAjjrrlRRDQf9kefDFuciKBrJCqK
................................................................
(...more...)
................................................................
ViWBhtNOV1Wzm3Ifv9ekm6cd1TjPO2UP/Vi5/Xz4PQ+maA7c1QXbdXGF29fc2VFI
JQKZxKKEfirZntyOH6chDQGeYnB7mXLpRNnNb7g=
-----END RSA PRIVATE KEY-----
If loading fails, an error will be generating describing the error. Most common error when loading the key will occur if password does not match one that was used when key was saved.