'How to encrypt password and pass on to CURL command on Linux

I want to run following CURL on Linux but with password in encryption form. How would I do that?

curl -u admin:password -X GET http://52.16.70.0:8081/artifactory/api/system/ping

I have generated encrypted password using openssl and base64 and those method seems hashes the inputs and not actually encrypt it.

Any help?



Solution 1:[1]

In order to have any sort of encryption you need to be using TLS.

See this answer:

https://stackoverflow.com/a/41456908/623541

For an example on how to use TLS see this answer:

https://superuser.com/a/976171/215214

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1