Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I keep user names and passwords secret in Curl command lines?

0
0 Posted

How do I keep user names and passwords secret in Curl command lines?

0
0

This problem has two sides: The first part is to avoid having clear-text passwords in the command line so that they don’t appear in ‘ps’ outputs and similar. That is easily avoided by using the “-K” option to tell curl to read parameters from a file or stdin to which you can pass the secret info. curl itself will also attempt to “hide” the given password by blanking out the option – this doesn’t work on all platforms. To keep the passwords in your account secret from the rest of the world is not a task that curl addresses. You could of course encrypt them somehow to at least hide them from being read by human eyes, but that is not what anyone would call security. Also note that regular HTTP (using Basic authentication) and FTP passwords are sent in clear across the network. All it takes for anyone to fetch them is to listen on the network. Eavesdropping is very easy. Use more secure authentication methods (like Digest, Negotiate or even NTLM) or consider the SSL-based alternatives HTTP

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123