Discuss this help topic in SecureBlackbox Forum
Store keys in SSH key storage
SecureBlackbox provides means for storing a set of SSH keys in the same 'key storage' file.
You can only store public keys in such way; each private key should be stored separately and individually.
The storage format used by SecureBlackbox is compatible with widely used authorized_keys file format.
The component responsible for work with key storages is TElSSHMemoryKeyStorage.
The use of the component is quite straightforward:
- First, you open the existing storage with LoadPublic() method.
If the storage is brand new and doesn't yet exist, you simply create a fresh TElSSHMemoryKeyStorage instance and work with it.
- You add or remove keys from the storage with Add(), Remove() or Clear() methods.
Note that the storage component owns its keys, so Add() call actually creates a copy of the key object passed to it.
All the internally kept key objects are disposed of when the storage component is destroyed.
You can iterate over individual keys via the Keys[] (get_Keys()) element and Count property.
- You save the updated storage with SavePublic() call.
This will serialize all the keys currently present in the storage to a file or stream.
You can use the functionality offered by TElSSHMemoryKeyStorage to store trusted/known server keys on the client side, or to store clients' public keys on the server side.
How To articles about SSH keys
Discuss this help topic in SecureBlackbox Forum