hello
i have use command string with password on ssh shell to esxi 6 console
now
when access to ssh console esx6 if using the arrows I can see the commands of old sessions.
not find solution for clear command
thanks
I understand that you want the previously run commands to not show up when you use the up arrow mark on the ESXi command line. If yes, follow the below steps in order -
1) Login to ESXi via SSH.
2) Run the command "> /.ash_history" to null the history file.
3) Logout and re-login. Now, it will not show you the previous commands when using up arrow mark.
4) Irrespective of the user, all the commands are stored even in shell.log (under /var/run/log). You can clear that as well using the command "> /var/run/log/shell.log".
Cheers,
Supreet
Try history -c. This should help you.
I understand that you want the previously run commands to not show up when you use the up arrow mark on the ESXi command line. If yes, follow the below steps in order -
1) Login to ESXi via SSH.
2) Run the command "> /.ash_history" to null the history file.
3) Logout and re-login. Now, it will not show you the previous commands when using up arrow mark.
4) Irrespective of the user, all the commands are stored even in shell.log (under /var/run/log). You can clear that as well using the command "> /var/run/log/shell.log".
Cheers,
Supreet
this command is only old version esx
hello
Yes, I know the shell.log file to delete
your command for delete history working perfect
you are the only person who has solved this problem. thank you
Permission denied, when I try to run this command via root user on ESXi, any idea how we can bypass and run this command successfully.
~ # /.ash_history
-sh: /.ash_history: Permission denied
If you want to read the file, use the command 'less /.ash_history'. If you want to empty it out, use the command '> /.ash_history'. If it is still failing, share a screenshot of your ESXi screen with the error.
Cheers,
Supreet
My bad I missed the important character '>' , it works like a charm. Thanks.
thanks for your help for esxi 6.x
do you know the same files to delete - and the same commands for vcenter vcsa 6.x too?
thanks
For vCSA, try the below steps -
1) Login to vCSA via SSH using the root account.
2) Enable shell.
3) Run the command "cd /" to navigate to the root dir.
4) Run the command "> /root/.bash_history" to null the history file.
5) Logout and re-login.
Cheers,
Supreet
hello
your command working perfect
but when re-login on vcsa the history show only command:
cd / and > /root/.bash_history
and another command i cleaner .... is correct?
the vcsa have file to permanent history shell.log to delete??
thanks
AFAIK, there is no other shell.log file for vCSA. .bash_history could be the only one. It will show you that command since that was the one used to null the file.
Cheers,
Supreet