Basically i want to get a record of all commands executed on my ssh server, with their times. The codes i have tried are :
ssh user@ip 'export HISTFILE=~/.bash_history; set -o history; history'
I got all commands,but i dont get time stamps with this which is expected i guess.
When i first login and then use history command, i get all details including date and time. I would like to get all details when i use history command with ssh. How should i go about it? OH yeah, and if possible i would like to get the history without needing to export HISTFILE.(IF POSSIBLE) Installing packages is not an option.