summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2015-11-04 12:44:21 -0800
committerJeff Forcier <jeff@bitprophet.org>2015-11-04 12:44:21 -0800
commitc9441c4a202dd53d4cb00946943745f580efa084 (patch)
treee5c7492ea2c429c75a8bc05a50c9a6feaea26311
parent956de60d53f0f9ed2f6b583ccefe88162665235c (diff)
Patch up a missed spot re: 2FA plus keys, thanks @mattrobenolt
-rw-r--r--paramiko/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index f30aba2f..8d899a15 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -504,7 +504,7 @@ class SSHClient (ClosingContextManager):
try:
key = pkey_class.from_private_key_file(key_filename, password)
self._log(DEBUG, 'Trying key %s from %s' % (hexlify(key.get_fingerprint()), key_filename))
- self._transport.auth_publickey(username, key)
+ allowed_types = set(self._transport.auth_publickey(username, key))
two_factor = (allowed_types & two_factor_types)
if not two_factor:
return