Thank you for this xyzulu, this looks good. For a scripting noob like I am, could this be adapted to have some more variables at the top for user@domain?
Also, is there a way to update this to check if there are existing ssh keys on either/both sides, and/or prompt for credentials to auto-add them?
Currently we access the shell from our local terminal, and the root user has our public keys in it. I'd prefer to have a new keypair for the servers to communicate with eachother I guess. Maybe just the control panel server to drop backup files to the backup server?
I'm extremely new to Enhance, so maybe this isn't worth it or I'm not thinking about this correctly.