feat: add ability to provide password for networkresources
Description
This adds the ability to specify a connection ssh password for resources that derive NetworkResource in order to use them on hosts where adding a ssh key is not possible or where the host key is regenerated after a reboot.
The implementation uses SSH_ASK_PASS in the same way as it is already done in SSHDriver.
Checklist
- [x] Tests for the feature
- [x] PR has been tested
This PR modifies the utility SSHManager which manages port forwarding, I don't think this is mergable since hosts used for ssh forwarding should be fundamentally under your control and the addition of SSH keys should not be a problem.
The other part I don't like is adding infrastructure passwords to the YAML, you should really be using public key authentication for this infrastructure.
Hm, I think you're seeing NetworkResources always in the context of the coordinator/exporter infrastructure. It's essentially the same discussion as in #1398 , I always think they could also be used in a more general way to access resources on any remotely accessible system..
Like : the exporter is just a service that happens to export local resources as network resources (and yes, should be easily connectable through passwordless ssh keypairs), but network resources themselves are not bound to only be created by the exporter.
This is a real use case here and works well for me already with this addition (and another one which implements ssh jumps)..