Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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