code: def get_public_keys(vm_):
      '''
      Retrieve list of SSH public keys.
      '''
      key_filename = config.get_cloud_config_value(
          'ssh_public_key', vm_, __opts__, search_global=False, default=None
      )
      if key_filename is not None:
          key_filename = os.path.expanduser(key_filename)
          if not os.path.isfile(key_filename):
              raise SaltCloudConfigError(
                  'The defined ssh_public_key \'{0}\' does not exist'.format(
                      key_filename
                  )
              )
          ssh_keys = []
          with salt.utils.files.fopen(key_filename) as rfh:
              for key in rfh.readlines():
                  ssh_keys.append(salt.utils.stringutils.to_unicode(key))
  
          return ssh_keyf get_public_keys(vm_):
      '''
      Retrieve list of SSH public keys.
      '''
      key_filename = config.get_cloud_config_value(
          'ssh_public_key', vm_, __opts__, search_global=False, default=None
      )
      if key_filename is not None:
          key_filename = os.path.expanduser(key_filename)
          if not os.path.isfile(key_filename):
              raise SaltCloudConfigError(
                  'The defined ssh_public_key \'{0}\' does not exist'.format(
                      key_filename
                  )
              )
          ssh_keys = []
          with salt.utils.files.fopen(key_filename) as rfh:
              for key in rfh.readlines():
                  ssh_keys.append(salt.utils.stringutils.to_unicode(key))
  
          return ssh_keys
docs: Retrieve list of SSH public keys.