Package paramiko :: Module hostkeys :: Class HostKeyEntry
[show private | hide private]
[frames | no frames]

Class HostKeyEntry


Representation of a line in an OpenSSH-style "known hosts" file.
Method Summary
  __init__(self, hostnames, key)
  from_line(cls, line)
Parses the given line of text to find the names for the host, the type of key given on this line in the known_hosts file, and the key data. (Class method)
  to_line(self)
Returns a string in OpenSSH known_hosts file format, or None if the object is not in a valid state.

Instance Method Details

to_line(self)

Returns a string in OpenSSH known_hosts file format, or None if the object is not in a valid state. A trailing newline is included.

Class Method Details

from_line(cls, line)

Parses the given line of text to find the names for the host, the type of key given on this line in the known_hosts file, and the key data.

Lines are expected to not have leading or training whitespace. We don't bother to check for comments or empty lines. All of that should be taken care of before sending the line to us.
Parameters:
line - a line from an OpenSSH known_hosts file
           (type=str)

Generated by Epydoc 2.1 on Wed Aug 16 14:35:05 2006 http://epydoc.sf.net