def load(self, filename):
f = open(filename, '<STR_LIT:r>')<EOL>for line in f:<EOL><INDENT>line = line.strip()<EOL>if (len(line) == <NUM_LIT:0>) or (line[<NUM_LIT:0>] == '<STR_LIT:#>'):<EOL><INDENT>continue<EOL><DEDENT>e = HostKeyEntry.from_line(line)<EOL>if e is not None:<EOL><INDENT>self._entries.append(e)<EOL><DEDENT><DEDENT>f.close()<EOL>
Read a file of known SSH host keys, in the format used by openssh.
This type of file unfortunately doesn't exist on Windows, but on
posix, it will usually be stored in
C{os.path.expanduser("~/.ssh/known_hosts")}.

If this method is called multiple times, the host keys are merged,
not cleared.  So multiple calls to C{load} will just call L{add},
replacing any existing entries and adding new ones.

@param filename: name of the file to read host keys from
@type filename: str

@raise IOError: if there was an error reading the file