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)


OK, in my case it's just as simple as starting the program script on the local host to log all input and output of the console, then start the SSH using script…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.