[KVM-AUTOTEST PATCH 6/6] KVM test: add -o PreferredAuthentications=password to SSH options

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

 



This speeds up SSH logins because by default other time consuming
authentication methods are attempted first.

Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/kvm_utils.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index b9219f6..bf25900 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -551,7 +551,8 @@ def scp_to_remote(host, port, username, password, local_path, remote_path,
 
     @return: True on success and False on failure.
     """
-    command = ("scp -o UserKnownHostsFile=/dev/null -r -P %s %s %s@%s:%s" %
+    command = ("scp -o UserKnownHostsFile=/dev/null "
+               "-o PreferredAuthentications=password -r -P %s %s %s@%s:%s" %
                (port, local_path, username, host, remote_path))
     return remote_scp(command, password, timeout)
 
@@ -571,7 +572,8 @@ def scp_from_remote(host, port, username, password, remote_path, local_path,
 
     @return: True on success and False on failure.
     """
-    command = ("scp -o UserKnownHostsFile=/dev/null -r -P %s %s@%s:%s %s" %
+    command = ("scp -o UserKnownHostsFile=/dev/null "
+               "-o PreferredAuthentications=password -r -P %s %s@%s:%s %s" %
                (port, username, host, remote_path, local_path))
     return remote_scp(command, password, timeout)
 
@@ -589,7 +591,8 @@ def ssh(host, port, username, password, prompt, linesep="\n", timeout=10):
 
     @return: kvm_spawn object on success and None on failure.
     """
-    command = ("ssh -o UserKnownHostsFile=/dev/null -p %s %s@%s" %
+    command = ("ssh -o UserKnownHostsFile=/dev/null "
+               "-o PreferredAuthentications=password -p %s %s@%s" %
                (port, username, host))
     return remote_login(command, password, prompt, linesep, timeout)
 
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux