I cannot remote reindex to a cluster protected with x-pack (https enabled) cause my ssl certificates are not trusted and i cannot also not leverage PKI authentication.
If I understand your issue, if you generated self-signed certificates for Elasticsearch you might be able to add those certificates to your "remote" system so that they are trusted.
Otherwise, I think you could just watch that issue you listed and/or ask additional questions there (like is there a work-around).
I'm going to just paste a chunk of bash script code I use during some testing. It covers several OSs.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.