The history command shows the recently-executed commands recorded in a history list.
How to clear bash command line history in linux
417 cd Our\ Beginning/
419 cd album/
421 vi index.html
423 vi index.html
424 cd ..
426 cd ..
To clear the history use the -c flag. You also need to remove the .bash_history file under your home directory.
I normally like to use alias of frequently used commands. You can create an alias to clear history and can run it once you finish.
Next time you wish to clear the history and exit out of the session execute
Another trick to disable your command history form being recorded is to set HISTFILESIZE variable to zero. Once you ssh to the server execute
This will set the history file size to zero for this session only. Your command history will not be saved :)