I am in a situation where I need to pass some texts to the generation request using the API (it seems to be a rather strange behavior for the API, this is the first time I came across this), as shown below:
kvm_cli = libvirt.open("qemu+ssh:// han@10.0.10.8 /system")
then a request appears asking for the ssh password for 10.0.10.8 is: ( password for 10.0.10.8 is: , I need to manually enter it there to go and provide the kvm_cli object that I need.
I tried using the pexpect module to solve this problem, but for the OS command line instead of the API.
You can also work around this using ssh certification files, but this is not a favorable approach to authentication in our scenario.
Since our shell for the "open" method is not interactive, we canβt ask the user to enter a password, you guys thought how I can solve it?
python libvirt
Ripley
source share