libvirt - How to deal with interactive API in python -


i'm in situation need pass texts prompt generate api (seems api it's pretty weird behavior, first time ran this), below:

kvm_cli = libvirt.open("qemu+ssh://han@10.0.10.8/system") 

then prompt shows asking ssh password (password 10.0.10.8 is:), have manually type there in order move on , yield kvm_cli object needed.

i tried use pexpect module deal it's os command line instead of api.

it's possible work around using ssh certification files it's not favorable authentication approach in our scenario.

since our wrapper 'open' method not interactive, cannot ask user input password, guys have thought how address it?

i not libvirt user, believe problem not in library, in connection method. seem connecting via ssh, need authenticate yourself.

i've been reading libvirt page on archwiki, , think try:


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -