[libvirt-users] xen+ssh with openauth

Shahar Havivi shaharh at redhat.com
Tue Nov 3 08:14:00 UTC 2015


Hi,

I am trying to connect to remote libvirt via script,
and I get password prompt from the shell.


============================================================================
uri='xen+ssh://root@myserver/?no_verify=1'
def req(credentials, user_data):
    print('in req...\n')
    for cred in credentials:
        if cred[0] == libvirt.VIR_CRED_AUTHNAME:
            cred[4] = username
        elif cred[0] == libvirt.VIR_CRED_PASSPHRASE:
            cred[4] = passwd
    return 0

auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE], req, None]
con = libvirt.openAuth(uri, auth, 0)
============================================================================

The script never enter req() method but prompts for password, after I enter
the password I am able to connect to the remote machine.

I did try to put all the flags ie:
auth = [[1,2,3,4,5,6,7,8], req, None]
with no successes as well...

The server is RHEL 5.11 with libvirt-0.8.2-29.el5_9.1

Thank you,
  Shahar.




More information about the libvirt-users mailing list