If I do ssh user@server
and then, inside the bash session, I run whatever, when ssh session is closed these executed commands go to .bash_history file. Simple and clear.
But if I do ssh user@server command
, this command isn't logged anywhere. Beyond the reason (I suspect no bash session is spawned), what I want to know is: how can I log what commands have been executed in this manner, then?