On Twitter, four proposals to improve security (because the command you mention leaves the password in the history).
Michel Leunen says « And do ’history -c’ at the end to erase your password from the terminal history ! »
And François Revol : « read p; echo -n “$p” | sha1sum # would avoid leaking it to history (but still briefly to ’ps’ output) » Colm MacCárthaigh suggests to solve this last proble with « tr -d ’\n’ | sha1sum »
Or Changaco, more radical : « don’t put it in the history at all (see HISTCONTROL in bash, HIST_IGNORE_SPACE in zsh) »
#Unix #CLI #security #password