My code:
import pysftp
s = pysftp.Connection(host=\'test.rebex.net\', username=\'demo\', password=\'password\')
data = s.listdir()
s.close()
for i in dat
That initial error appears to be a problem connecting with the remote server (SSHException). The second (AttributeError), is from a bug in the code that occurs when the connection fails. It is fixed in the latest version of pysftp
https://pypi.python.org/pypi/pysftp
pip install -U pysftp
is your friend.