On Tue, Nov 10, 2020 at 16:11:40 +0100, Michal Privoznik wrote:
Marc-André posted a patch that implements agent handling. I've
written
the rest.
Marc-André Lureau (1):
qemu_agent: add qemuAgentSSH{Add,Remove,Get}AuthorizedKeys
Michal Prívozník (5):
Introduce OpenSSH authorized key file mgmt APIs
One more thing to think about:
Since we are getting random requests for setters of various bits which
we have to bend the rule "we don't care what's running in the VM" and
which don't really scale when adding new APIs. I propose we add a
generic guest agent setter which will be extensible using a typed
parameters and a type property.
It will basically become the counterpart to virDomainGetGuestInfo.
The extensions then become enum additions and code additions only and
will be more flexible for future use.
The same way the getter forthe ssh keys should become part of
virDomainGetGuestInfo, obviously auditing whether a read-write
connection is used.
example:
int
qemuDomainSetGuestInfo(virDomainPtr dom,
virDomainSetGuestInfoType type,
virTypedParamPtr params,
unsigned int nparams,
unsigned int flags);
Invocation for setting keys:
virTypedParamsAddString(..., "user", "root")
virTypedParamsAddString(..., "key", "ssh-rsa AA.... root@localhost")
virTypedParamsAddString(..., "key", "ssh-rsa AA.... user@localhost")
etc.