I have a script which runs a bunch of remote SSH commands. This list of commands grew large so I want to pull them out, but of course there are many maskings in the command (e.g. "$USER" as "\$USER"), sometimes in more than one shell depth the maskings occur, making it a longer approach to pull all out by hand.
So I asked myself: is there some sort of SSH (or sshpass) command history (e.g. similar to .bash_history), where I can simply pull out what has been executed? (logging on local host would be the best, installing something on foreign host the worst)