4 ms·
Odd that your history is being cleared out, it's never happened to me. I always keep my own history of every command I ever run. I've moved this from computer
by kilroy123 10y ago
Odd that your history is being cleared out, it's never happened to me.
I always keep my own history of every command I ever run. I've moved this from computer to computer. So I can look back years in the past and see what I've done.
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"; echo `date +"%b %e %Y %H:%M:%S"` $? \"`history 1|cut -c7-`\" in `pwd` >> ~/.audit'
;;
*)
;;
esac
- slarrick 10y agoI could never do this. I type my ssh password as a bash command too often. My file would turn out to be a password history!
- fjdlwlv 10y agoUse ssh keys
- jcsalterego 10y agoIs your ssh password `ls`? That's not a great password.
- TheGRS 10y agoI think he means he types it out accidentally, we've all been there. Bonus points for when you're doing it on a screenshare or projector.
- bobwaycott 10y agoYikes. You use SSH passwords?
- kilroy123 10y agoAh never thought of that... I use ssh keys myself so never a concern. You could scrub the file of all entries where you are ssh'ing in?