As it seems passing the password in the uri is not a good option, maybe we
can grab it from auth conf ? it seems it's not the case as now (tell me if i am wrong).
So enclosed a patch to add this feature.
As you can see in virnetclient.c there is no virAuthGetPassword call, so
the authfile is never used.
The patch enclosed is modifying the function prototype to add virConnectPtr parameter (so remote_driver.c virNetClientNewLibSSH2 call has to be updated too and the corresponding .h too).
Once we have access to virConnectPtr, as you will see in the patch we
can check if authMethods is set to 'password' and grab the password from auth file by calling virAuthGetPassword.