def load(self, filename):
        offset = len(self._lines)
        with open(filename, 'r') as f:
            for lineno, line in enumerate(f):
                self._lines.append(line.rstrip('\n'))
                try:
                    e = HostKeyEntry.from_line(line, lineno)
                    if e is not None:
                        # Just construct the host index entries during load
                        # Identify as hashed entry, negation, wildcard, or regular
                        # Keep the index by the source lineno (plus offset, if
                        # loading multiple files), as the matching needs the
                        # whole line for negation logic, and to pick up the
                        # optional @marker...
                        for h in e.hostnames:
                            if h.startswith('|'):
                                self._hashed_hosts.append((h, offset + lineno))
                            elif h.startswith('!'):
                                # negation - do not index
                                pass
                            elif '*' in h or '?' in h:
                                self._wildcards.append((h, offset + lineno))
                            else:
                                self._index[h].append(offset + lineno)
                except (UnreadableKey, TypeError) as e:
                    logging.getLogger('radssh.keys').error(
                        'Skipping unloadable key line (%s:%d): %s' % (filename, lineno + 1, line))
                    pass
Load and index keys from OpenSSH known_hosts file. In order to
dataset/ETHPy150Open radssh/radssh/radssh/known_hosts.py/KnownHosts.load