I just hadthe requirement to monitoring some devices via ssh commands. (the only option I have because the systems where closed appliances where I cant configure anything).
For speed purposes I came accross this post: https://labs.consol.de/de/nagios/omd/2012/06/12/running-check_by_ssh-over-a-persistent-ssh-connection.html
and I was wondering if it would be simplier and easier just to use this in my ssh configuration:
Host * ControlMaster auto ControlPath ~/.ssh/master-socket/%r@%h:%p ControlPersist 60s
So that when a New SSH Connection is created and no socket already exists it just makes an new master out of it automatically.
Has someone expieriences with that and used this in production environmetns?
Thanks for any input.