top | item 22977336

(no title)

cassiet | 5 years ago

How exactly?

discuss

order

jedimastert|5 years ago

I think what OP meant was closer to "if it could have been entered into the bash history than there's other ways it could be seen".

Most CLI programs that need sensetive information as input should either do it interactively (a la sudo), as standard input, or configuration file. If worst comes to very worst, you can put the sensitive info in a text file and use backticks. For example:

  some-command --username=jedimastert --password=`cat secret.txt`

fooblat|5 years ago

> some-command --username=jedimastert --password=`cat secret.txt`

This will not work in the way that you suggest. The output of ps will show the result of `cat secret.txt` and thus reveal the password.

lmz|5 years ago

How would backticks help with hiding it from ps?