I am ssh'ing into a remote server and then su'ing to root.

The problem is that sometimes, I have not paid enough attention to the console message, and I have accidentally typed in the root password at the command prompt (when for example, I had failed to provide the root password correctly the first time - so su prompt went away).

I remember reading somewhere that a history of commands typed at the console is kept somewhere.

I have 3 sub questions

  1. Where (which folder) is the file stored?
  2. Can I edit that file and remove the root password from it?
  3. Being the paranoid person that I am, I wonder if there is a more secure way of logging into my server - other than ssh (or am I being TOO paranoid?)

My server is running a headless Ubuntu 10.0.4

link|improve this question

70% accept rate
ssh is most secure. – mugen kenichi Aug 7 '10 at 13:04
thanks for the reassurance mugen! – morpheous Aug 7 '10 at 18:26
feedback

1 Answer

up vote 1 down vote accepted

If you are using bash, the history is in ~/.bash_history, yes, you can edit it.

But there's nothing that will prevent you from entering your password in the wrong place, short of paying attention.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.