code: def get_ssh_keys(sshdir):
      
      keys = Queue()
      for root, _, files in os.walk(os.path.abspath(sshdir)):
          if not files:
              continue
          for filename in files:
              fullname = os.path.join(root, filename)
              if (os.path.isfile(fullname) and fullname.endswith('_rsa') or
                      fullname.endswith('_dsa')):
                  keys.put(fullname)
      return keys
docs: Get SSH keys