From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
QEMU <qemu-devel@nongnu.org>,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] qga: add ssh-{add,remove}-authorized-keys
Date: Tue, 20 Oct 2020 10:46:04 +0400 [thread overview]
Message-ID: <CAJ+F1C+6hOa_n3KGw=xnNwE-oBGc6jOnpt-JWm7Y3x7i9BF_XA@mail.gmail.com> (raw)
In-Reply-To: <d0f6e513-d890-5759-0a1e-de37a5ee241a@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]
Hi
On Mon, Oct 19, 2020 at 11:09 PM Eric Blake <eblake@redhat.com> wrote:
> On 10/13/20 3:25 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Add new commands to add and remove SSH public keys from
> > ~/.ssh/authorized_keys.
> >
>
> > +++ b/qga/qapi-schema.json
> > @@ -1306,3 +1306,35 @@
> > ##
> > { 'command': 'guest-get-devices',
> > 'returns': ['GuestDeviceInfo'] }
> > +
> > +##
> > +# @guest-ssh-add-authorized-keys:
> > +#
> > +# @username: the user account to add the authorized key
> > +# @keys: the public keys to add (in OpenSSH format)
> > +#
> > +# Append a public key to user $HOME/.ssh/authorized_keys on Unix
> systems (not
>
> How is $HOME related to @username?
>
If it's not obvious, I could use help on how to formulate this. Would you
rather use the ~username/ syntax? Or just ~/ ?
> > +# implemented for other systems).
> > +#
> > +# Returns: Nothing on success.
>
> Do we really need this line?
>
For consistency, at least.
> > +#
> > +# Since: 5.2
> > +##
> > +{ 'command': 'guest-ssh-add-authorized-keys',
> > + 'data': { 'username': 'str', 'keys': ['str'] } }
>
> Should we use QAPI 'if' to avoid even having to compile a stub on
> Windows, and for better introspection (well, if we ever add a way to do
> qga introspection that parallels QMP's query-qmp-schema)?
>
There is no 'if' usage in QGA schema. As you point out, there is no
introspection command atm. But we can start using it here, I guess.
> > +
> > +##
> > +# @guest-ssh-remove-authorized-keys:
> > +#
> > +# @username: the user account to add the authorized key
> > +# @keys: the public keys to remove (in OpenSSH format)
> > +#
> > +# Remove public keys from the user $HOME/.ssh/authorized_keys on Unix
> systems
> > +# (not implemented for other systems).
> > +#
> > +# Returns: Nothing on success.
> > +#
> > +# Since: 5.2
> > +##
> > +{ 'command': 'guest-ssh-remove-authorized-keys',
> > + 'data': { 'username': 'str', 'keys': ['str'] } }
> >
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3226
> Virtualization: qemu.org | libvirt.org
>
>
>
thanks
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 3916 bytes --]
next prev parent reply other threads:[~2020-10-20 6:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 20:25 [PATCH 0/2] qemu-ga: add ssh-{add,remove}-authorized-keys marcandre.lureau
2020-10-13 20:25 ` [PATCH 1/2] glib-compat: add g_unix_get_passwd_entry_qemu() marcandre.lureau
2020-10-13 20:25 ` [PATCH 2/2] qga: add ssh-{add,remove}-authorized-keys marcandre.lureau
2020-10-13 21:14 ` Philippe Mathieu-Daudé
2020-10-14 7:37 ` Marc-André Lureau
2020-10-14 11:18 ` Philippe Mathieu-Daudé
2020-10-15 12:10 ` Daniel P. Berrangé
2020-10-19 19:02 ` Eric Blake
2020-10-20 6:46 ` Marc-André Lureau [this message]
2020-10-13 20:33 ` [PATCH 0/2] qemu-ga: " no-reply
2020-10-14 10:43 ` Michal Privoznik
2020-10-14 10:49 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ+F1C+6hOa_n3KGw=xnNwE-oBGc6jOnpt-JWm7Y3x7i9BF_XA@mail.gmail.com' \
--to=marcandre.lureau@gmail.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).