Re: [PATCH] remote/ssh: optional "keyfile" parameter.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/19/2011 11:52 AM, Oskari Saarenmaa wrote:
New optional parameter "keyfile" for ssh transport allows the user to select
the private key to be used to authenticate to the remote host.
---
  docs/remote.html.in        |   16 ++++++++++++++++
  src/remote/remote_driver.c |    9 ++++++++-
  src/rpc/virnetclient.c     |    4 +++-
  src/rpc/virnetclient.h     |    1 +
  src/rpc/virnetsocket.c     |    3 +++
  src/rpc/virnetsocket.h     |    1 +
  tests/virnetsockettest.c   |   12 ++++++++++++
  7 files changed, 44 insertions(+), 2 deletions(-)

Looks nice.  ACK and applied.


@@ -594,6 +595,8 @@ int virNetSocketNewConnectSSH(const char *nodename,
          virCommandAddArgList(cmd, "-p", service, NULL);
      if (username)
          virCommandAddArgList(cmd, "-l", username, NULL);
+    if (keyfile)
+        virCommandAddArgList(cmd, "-i", keyfile, NULL);

virCommand is so much nicer than in the old days where we used to over-allocate an argv array based on a computation of the maximum number of argv we might want to populate!

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]