INDIA WEB HOSTING FAQs

January 16, 2011

Clear-ssh-command-history-in-ssh-cache-from-server

Filed under: Dedicated Server,Virtual Private Server,Web-Hosting — Tags: , — Unichost @ 11:15 am

When I login to SSH and push the up arrow, the previous commands are shown. How do I clear or delete that log?

Clear the history for current login or current user.
#history -c

First find the history file for particular user.
Delete .bash_history file, will be recreated again next time.
#locate .bash_history
#rm .bash_history

It is not a best practice to totally disable the ssh command history on any dedicated server or vps server. It’s a quick reference to user’s past actions on server.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress