I have to admit I have no clue how to do that, any pointers?
I thought of utilising my 4 machines at home sometimes for such things and would hugely benefit from implementing this using standard tools.
I thought of utilising my 4 machines at home sometimes for such things and would hugely benefit from implementing this using standard tools.
My code is poorly documented and badly written, but it works at least the ssh_copy_id one I use enough to keep updated[1] (that ssh logins with passwords to place the ssh keys).
That's my script, the brains of it is basically an ssh connector.
Paramiko is as simple as
s = SSHClient()
s.connect(hostname=h[1], username=h[0], password=pwd)
(_in, _out, _err) = s.exec_command( cmd, bufsize=4096)
Originally, I had awk scripts to process ^A separated, I'd read the out stream back and formulate my next script over the logs to drill-down in a loop.[1] - https://github.com/t3rmin4t0r/batchman/blob/master/ssh_copy_...