t.c.i.IKnownHostEntry(Interface) : interface documentation

Part of twisted.conch.interfaces View Source View In Hierarchy

Known implementations: twisted.conch.client.knownhosts.HashedEntry, twisted.conch.client.knownhosts.PlainEntry, twisted.conch.client.knownhosts.UnparsedEntry

A IKnownHostEntry is an entry in an OpenSSH-formatted known_hosts file.
Present Since8.2
Method matchesKey Return True if this entry matches the given Key object, False otherwise.
Method matchesHost Return True if this entry matches the given hostname, False otherwise.
Method toString
def matchesKey(key): (source)
Return True if this entry matches the given Key object, False otherwise.
ParameterskeyThe key object to match against. (type: twisted.conch.ssh.Key)
def matchesHost(hostname): (source)
Return True if this entry matches the given hostname, False otherwise.

Note that this does no name resolution; if you want to match an IP address, you have to resolve it yourself, and pass it in as a dotted quad string.

ParameterskeyThe hostname to match against. (type: str)
def toString(): (source)
Returnsa serialized string representation of this entry, suitable for inclusion in a known_hosts file. (Newline not included.) (type: str)
API Documentation for Twisted, generated by pydoctor at 2013-11-08 22:07:30.