Home | Trees | Indices | Help |
---|
|
UserDict.DictMixin --+ | HostKeys
Representation of an openssh-style "known hosts" file. Host keys can be read from one or more files, and then individual hosts can be looked up to verify server keys during SSH negotiation.
A HostKeys object can be treated like a dict; any dict lookup is equivalent to calling lookup.
Since: 1.5.3
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
|
|||
|
|||
|
|||
dict(str, PKey) |
|
||
|
|||
|
|||
Inherited from |
Static Methods | |||
str |
|
Method Details |
Create a new HostKeys object, optionally loading keys from an openssh style host-key file.
|
Add a host key entry to the table. Any existing entry for a
|
Return True if the given key is associated with the given hostname in this dictionary.
|
Remove all host keys from the dictionary.
|
Return a "hashed" form of the hostname, as used by openssh when storing hashed hostnames in the known_hosts file.
|
Read a file of known SSH host keys, in the format used by openssh.
This type of file unfortunately doesn't exist on Windows, but on posix,
it will usually be stored in
If this method is called multiple times, the host keys are merged, not
cleared. So multiple calls to
|
Find a hostkey entry for a given hostname or IP. If no entry is
found,
|
Save host keys into a file, in the format used by openssh. The order of keys in the file will be preserved when possible (if these keys were loaded from a file originally). The single exception is that combined lines will be split into individual key lines, which is arguably a bug.
Since: 1.6.1 |
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Nov 1 22:14:16 2009 | http://epydoc.sourceforge.net |