t.c.c.k.PlainEntry(_BaseEntry) : class documentation

Part of twisted.conch.client.knownhosts View Source View In Hierarchy

Implements interfaces: twisted.conch.interfaces.IKnownHostEntry

A PlainEntry is a representation of a plain-text entry in a known_hosts file.
Instance Variables_hostnamethe host-name associated with this entry. (type: str )
Method __init__ Undocumented
Class Method fromString Parse a plain-text entry in a known_hosts file, and return a corresponding PlainEntry.
Method matchesHost Check to see if this entry matches a given hostname.
Method toString Implement IKnownHostEntry.toString by recording the comma-separated hostnames, key type, and base-64 encoded key.

Inherited from _BaseEntry:

Method matchesKey Check to see if this entry matches a given key object.
def __init__(self, hostnames, keyType, publicKey, comment): (source)
Undocumented
@classmethod
def fromString(cls, string): (source)
Parse a plain-text entry in a known_hosts file, and return a corresponding PlainEntry.
Parametersstringa space-separated string formatted like "hostname key-type base64-key-data comment". (type: str )
Returnsan IKnownHostEntry representing the hostname and key in the input line. (type: PlainEntry )
RaisesDecodeErrorif the key is not valid encoded as valid base64.
InvalidEntryif the entry does not have the right number of elements and is therefore invalid.
BadKeyErrorif the key, once decoded from base64, is not actually an SSH key.
def matchesHost(self, hostname): (source)
Check to see if this entry matches a given hostname.
Parametershostname (type: str )
Returns (type: bool )
def toString(self): (source)
Implement IKnownHostEntry.toString by recording the comma-separated hostnames, key type, and base-64 encoded key.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.