Back to product page
Save method
Saves keys to the file.
Type
NoneSyntax
- Basic
object.Save KeyType, Filename, [Password]
The Save(object,KeyType,Filename,Password) syntax has these parts:
The Save(object,KeyType,Filename,Password) syntax has these parts:
object | An expression evaluating to an object of type Keys. |
KeyType | Required. A SSHKeyTypes enumeration, as described in settings. Type of the key. |
Filename | Required. A String value. Full path to file where key should be saved. |
Password | Optional. A Variant value. Secret password to protect the key. |
Remarks
The settings for KeyType are:Constant | Value | Description |
---|---|---|
RSAkey | 0 | RSA key is saved. |
DSAkey | 1 | DSA key is saved. |
ECDSAkey | 2 | ECDSA key is saved. |
Save method will store contents of your private key from memory to file on your disk drive.
Key is saved using PEM format, as base64 encoded data surrounded by header lines, which makes it exportable (and importable) to other SSH engines. Optionally (and is suggested) you can specify the password to be used when key is written to disk, so only you can read saved key. Don't forget to use the same password when Loading key from disk.
Written file contains only plain ASCII characters.