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:
- setting simple (tcp/ip socket) connection method, or
- setting key-based, password-less ssh login virtual host.
Comments
Post a Comment