diff --git a/paramiko/pkey.py b/paramiko/pkey.py index e925bb6..cbc1837 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -26,6 +26,7 @@ import os from Crypto.Hash import MD5 from Crypto.Cipher import DES3, AES +import six from paramiko.common import * from paramiko import util @@ -303,7 +304,7 @@ class PKey (object): end += 1 # if we trudged to the end of the file, just try to cope. try: - data = base64.decodestring(''.join(lines[start:end])) + data = base64.decodestring(six.b(''.join(lines[start:end]))) except base64.binascii.Error as e: raise SSHException('base64 decoding error: ' + str(e)) if 'proc-type' not in headers: