[libvirt] Libvirt Auth

Marco Mornati mmornati at byte-code.com
Wed Mar 3 19:44:57 UTC 2010

> Ah, the authentication callback is used for hypervisor level
> authentication. You cannot provide credentials for SSH transport level
> authentication through the libvirt API. You'll need to setup the SSL
> certificates properly to enable automatic SSH login if you don't want
> to be prompted for the SSH credentials.
> Matthias

Ohh... ok... it's not really what I want (because I could have many
different machines to configure).
Reading to libvirt sources (the c file) it seams that auth callbacks
should be used also for the ssh code (inside openSSHSession method):

virConnectCredential creds[] = {
            {VIR_CRED_PASSPHRASE, "password", "Password", NULL, NULL,

        if (!auth || !auth->cb) {
                       "%s", _("No authentication callback provided."));
            goto disconnect;

maybe in some way it's possible to use ssh too with auth (I don't know
but I want to try).

Anyway, Matt, if I expose libvirt over tcp can I use it directly with
provided callbacks?

Thanks a lot

Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmornati at byte-code.com

More information about the libvir-list mailing list