No way to add a host key from a string
Author: alexregCreated Dec 17, 2017Updated Jul 23, 2026
LabelsKeysFeature
It seems there is currently no way to add a host key from a string, but rather only a file. See http://docs.paramiko.org/en/2.4/api/hostkeys.html.
I would suggest either exposing the HostKeys.entries attribute so that HostKeyEntrys can be added directly, or adding some proxy methods on the HostKeys class for adding/removing/updating HostKeyEntrys.
Furthermore, it would be nice if the HostKey class could load from a file-like object.
Source: paramiko/paramiko