def auth_keys(user=None, config='.ssh/authorized_keys'):
 if (not user):
  user = __salt__['user.list_users']()
 old_output_when_one_user = False
 if (not isinstance(user, list)):
  user = [user]
  old_output_when_one_user = True
 keys = {}
 for u in user:
  full = None
  try:
   full = _get_config_file(u, config)
  except CommandExecutionError:
   pass
  if (full and os.path.isfile(full)):
   keys[u] = _validate_keys(full)
 if old_output_when_one_user:
  if (user[0] in keys):
   return keys[user[0]]
  else:
   return {}
 return keys

def auth_keys ( user = None , config = '.ssh/authorized_keys' ) : if ( not user ) : user = __salt__ [ 'user.list_users' ] ( ) old_output_when_one_user = False if ( not isinstance ( user , list ) ) : user = [ user ] old_output_when_one_user = True keys = { } for u in user : full = None try : full = _get_config_file ( u , config ) except CommandExecutionError : pass if ( full and os . path . isfile ( full ) ) : keys [ u ] = _validate_keys ( full ) if old_output_when_one_user : if ( user [ 0 ] in keys ) : return keys [ user [ 0 ] ] else : return { } return keys
return the authorized keys for users cli example: .