Part of twisted.conch.client.knownhosts View Source View In Hierarchy
| Method | __init__ | Create a new, empty KnownHostsFile. | 
| Method | hasHostKey | |
| Method | verifyHostKey | Verify the given host key for the given IP and host, asking for confirmation from, and notifying, the given UI about changes to this file. | 
| Method | addHostKey | Add a new HashedEntryto the key database. | 
| Method | save | Save this KnownHostsFileto the path it was loaded from. | 
| Class Method | fromPath | |
| Instance Variable | _entries | a list of IKnownHostEntryproviders. | 
| Instance Variable | _savePath | the FilePathto save new entries to. | 
You want to use KnownHostsFile.fromPath
to parse one of these.
| Returns | True if the given hostname and key are present in this file, False if they 
are not. (type: bool) | |
| Raises | HostKeyChanged | if the host key found for the given hostname does not match the given key. | 
| Parameters | ui | The user interface to request an IP address from. | 
| hostname | The hostname that the user requested to connect to. | |
| ip | The string representation of the IP address that is actually being connected to. | |
| key | The public key of the server. | |
| Returns | a Deferredthat fires with True when the key has been verified, or fires with an 
errback when the key either cannot be verified or has changed. (type:Deferred) | |
HashedEntry
to the key database.
Note that you still need to call KnownHostsFile.save
if you wish these changes to be persisted.
| Returns | the HashedEntrythat was added. | |
| Parameters | path | A path object to use for both reading contents from and later saving to. (type: FilePath) |