• caglararli@hotmail.com
  • 05386281520

How do I set up a secure .netrc for curl used in crontab job?

Çağlar Arlı      -    15 Views

How do I set up a secure .netrc for curl used in crontab job?

I have a cron job which runs a curl command using .netrc to provide authentication needed to access the url curl is using. However the credentials stored in .netrc are currently in plain text. The .netrc file has 600 permissions. However, I have read that passwords stored in plain text is just plain bad.

I have read suggestions of encrypting the .netrc file, however I am not finding how, if the file is encrypted, how curl will access it.

How do I get curl to access the data from an encrypted .netrc file?

Or, is there a better way to do this altogether?