def is_key_line(key):
    """Check whether this line looks like a valid known_hosts line."""
    if not key:
        return False
    if key[0] == '#':
        return False
    if key[0] == '@':
        return False
    return (' ssh-rsa ' in key or ' ecdsa-sha2-nistp256 ' in key or 
        ' ssh-ed25519 ' in key)
