Part of twisted.conch.client View Source
Various classes and functions for implementing user-interaction in the command-line conch client.You probably shouldn't use anything in this module directly, since it assumes you are sitting at an interactive terminal. For example, to programmatically interact with a known_hosts database, use
|Function||verifyHostKey||Verify a host's key.|
|Function||isInKnownHosts||checks to see if host is in the known_hosts file for the user. returns 0 if it isn't, 1 if it is and is the same, 2 if it's changed.|
Verify a host's key.
This function is a gross vestige of some bad factoring in the client
internals. The actual implementation, and a better signature of this logic
This function is not deprecated yet because the callers have not yet been
rehabilitated, but they should eventually be changed to call that method
KnownHostsFile.verifyHostKey. It determines the path to the user's known_hosts file based on the options (which should really be the options object's job), and it provides an opener to
ConsoleUIwhich opens '/dev/tty' so that the user will be prompted on the tty of the process even if the input and output of the process has been redirected. This latter part is, somewhat obviously, not portable, but I don't know of a portable equivalent that could be used.
|Parameters||host||Due to a bug in |
|transport||the client transport which is attempting to connect to the given
|fingerprint||the fingerprint of the given public key, in xx:xx:xx:... format. This
is ignored in favor of getting the fingerprint from the key itself.
|pubKey||The public key of the server being connected to.