Hello,

Is there a way to configure bash so that commands from a non-interactive shell 
are preserved in the history? I'm more interested in saving commands invoked 
via ssh vs shell scrpts. I did not succeed when trying a few things to "force" 
interactive mode such as:
# invoke bash as a login shell
ssh user@host "/bin/bash -lc 'echo test'"

# same thing, forcing a pseudo-tty (two "t" flags for good measure)
ssh -t user@host "/bin/bash -lc 'echo test'"
ssh -tt user@host "/bin/bash -lc 'echo test'"

The ideal solution would be to have a configuration set up so that the server 
would record history for any incoming ssh commands (and not have to craft the 
client side commands like above). Is this doable?

Thank you,

Lars Peterson





Reply via email to