def readAuthorizedKeyFile(fileobj, parseKey=keys.Key.fromString):
 for line in fileobj:
  line = line.strip()
  if (line and (not line.startswith('#'))):
   try:
    (yield parseKey(line))
   except keys.BadKeyError as e:
    log.msg('Unable to parse line "{0}" as a key: {1!s}'.format(line, e))

def readAuthorizedKeyFile ( fileobj , parseKey = keys . Key . fromString ) : for line in fileobj : line = line . strip ( ) if ( line and ( not line . startswith ( '#' ) ) ) : try : ( yield parseKey ( line ) ) except keys . BadKeyError as e : log . msg ( 'Unable to parse line "{0}" as a key: {1!s}' . format ( line , e ) )
reads keys from an authorized keys file .