diff --git a/paramiko/client.py b/paramiko/client.py
index <HASH>..<HASH> 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -455,6 +455,7 @@ class SSHClient (object):
                     if not remaining_auth_types:
                         return
                     two_factor = True
+                    break
                 except SSHException, e:
                     saved_exception = e
         else:
@@ -485,6 +486,7 @@ class SSHClient (object):
                     if not remaining_auth_types:
                         return
                     two_factor = True
+                    break
                 except SSHException, e:
                     saved_exception = e
                 except IOError, e:
make sure to break out of key auth loop on success when doing 2-factor
(cherry picked from commit 0a4aa8a9d<I>adef3b8d<I>f<I>ea<I>fc1a)