I want to have the benefits of bash history command lookup, but working on multiple hosts I ssh to. However, I don't have a home directory on most of the remotes due to security policy, so there is no
export HISTFILE=/tmp/blah does not work for current session. Even if I had a file there, it should be sync'ed across multiple remotes through some local file.
A solution should probably look like this:
alias or somehow, execute something around every ssh command, e.g.
scp .remote-history user@remote:/tmp/history ssh user@remote scp user@remote:/tmp/history .remote-history.add cat .remote-history.add >> .remote-history
unless there is an existing tool that does something similar.