>>> import paramiko
>>> import os
>>> ssh = paramiko.SSHClient()
>>> ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>>> ssh.load_host_keys(os.path.join(os.environ['HOME'],'.ssh','known_hosts'))
>>> ssh.connect('10.10.1.85',username='testuser01',password='TestPass01')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 424, in connect
passphrase,
File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 652, in _auth
self._transport.auth_publickey(username, key))
File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 1446, in auth_publickey
self.auth_handler.auth_publickey(username, key, my_event)
File "/usr/local/lib/python2.7/dist-packages/paramiko/auth_handler.py", line 103, in auth_publickey
self._request_auth()
File "/usr/local/lib/python2.7/dist-packages/paramiko/auth_handler.py", line 165, in _request_auth
self.transport._send_message(m)
File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 1707, in _send_message
self.packetizer.send_message(data)
File "/usr/local/lib/python2.7/dist-packages/paramiko/packet.py", line 385, in send_message
out = self.__block_engine_out.update(packet)
File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/ciphers/base.py", line 149, in update
return self._ctx.update(data)
File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py", line 120, in update
n = self.update_into(data, buf)
File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py", line 131, in update_into
"unsigned char *", self._backend._ffi.from_buffer(buf)
TypeError: from_buffer() cannot return the address of the raw string within a str or unicode or bytearray object
I've tried various "fixes" I found for Ubuntu 16.04 and Python 2.7 but none have fixed the problem.