Have you ever run a command on one of your hosts and then wanted to retrieve it later? Then couldn’t remember where you ran it, or it’s lost from your history?
This happens to me all the time. The other day I was hunting for a command I was convinced I’d run, but wasn’t sure where it was or whether it was stored.
So I finally wrote a service that records my every command centrally.
Here’s an overview of its (simple) architecture.
This stores your bash history on a server in a file.
The service runs on a port of your choosing, and if you have some lines in your
~.bashrc file then it will all work seamlessly for you.
There’s some basic authentication (shared key) to prevent abuse of the service.
To set up, see the README.
socat installed, and
bash version 4+.
I need help to improve this – see the
If you ask nicely I might host it for you, without warranty etc..