I'm trying to make a highly available topology, by executing all of the cli commands that have been executed from one machine to another - Doing this will syncronize their configurations. Therefore, if the first machine breaks or something else happens to it, I can make a failover to the second one that will have the same configuration due to this monitoring & executing. To make it easier I'm only working with root user on both machines.
I am familiar with the history
command in linux, but that way I will have to create my own scripts for monitoring and then executing the commands via ssh. Is there a service/project that can do such a thing, if not is there a easier way?
How can I make that happen in real time?