Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`conch`.`client`.`knownhosts`.`PlainEntry``

class documentation

`class PlainEntry(_BaseEntry): (source)`

Implements interfaces: `twisted.conch.interfaces.IKnownHostEntry`

View In Hierarchy

A `PlainEntry` is a representation of a plain-text entry in a known_hosts file.

Class Method | `fromString` | Parse a plain-text entry in a known_hosts file, and return a corresponding `PlainEntry`.
Method | `__init__` | Undocumented
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.
Instance Variable | `_hostnames` | the list of all host-names associated with this entry.

Inherited from `_BaseEntry`:

Method | `matchesKey` | Check to see if this entry matches a given key object.
Instance Variable | `comment` | Trailing garbage after the key line.
Instance Variable | `keyType` | The type of the key; either ssh-dss or ssh-rsa.
Instance Variable | `publicKey` | The server public key indicated by this line.

@classmethod
def fromString(cls, string): (source)

Parse a plain-text entry in a known_hosts file, and return a corresponding `PlainEntry`.

Parameters
string:`bytes` | a space-separated string formatted like "hostname key-type base64-key-data comment".
Returns
`PlainEntry` | an IKnownHostEntry representing the hostname and key in the input line.
Raises
`DecodeError` | if the key is not valid encoded as valid base64.
`InvalidEntry` | if the entry does not have the right number of elements and is therefore invalid.
`BadKeyError` | if the key, once decoded from base64, is not actually an SSH key.

def __init__(self, hostnames, keyType, publicKey, comment): (source)
overrides `twisted.conch.client.knownhosts._BaseEntry.__init__`

Undocumented

def matchesHost(self, hostname): (source)
from `twisted.conch.interfaces.IKnownHostEntry`

Check to see if this entry matches a given hostname.

Parameters
hostname:`bytes` | A hostname or IP address literal to check against this entry.
Returns
`bool` | `True` if this entry is for the given hostname or IP address, `False` otherwise.

def toString(self): (source)
from `twisted.conch.interfaces.IKnownHostEntry`

Implement `IKnownHostEntry.toString` by recording the comma-separated hostnames, key type, and base-64 encoded key.

Returns
`bytes` | The string representation of this entry, with unhashed hostname information.

_hostnames: `list` of `bytes` = (source)

the list of all host-names associated with this entry.