我正在尝试使用以下代码通过Pysftp模块连接到 SFTP 服务器
a = pysftp.Connection('xx.yyy.zz.abc',username='abcd',password='xyz@123',log=True)
这会引发以下错误
NotImplementedError Traceback (most recent call last)
<ipython-input-6-5d0f8343a8c2> in <module>()
----> 1 a = pysftp.Connection('xx.yyy.zz.abc',username='abcd',password='xyz@123',log=True)
C:\Python27\lib\site-packages\pysftp.pyc in __init__(self, host, username, private_key, password, port, private_key_pass, ciphers, log)
160 if password is not None:
161 # Using Password.
--> 162 self._transport.connect(username=username, password=password)
163 else:
164 # Use Private Key.
C:\Python27\lib\site-packages\paramiko-1.15.2-py2.7.egg\paramiko\transport.pyc in connect(self, hostkey, username, password, pkey, gss_host, gss_auth, gss_kex, gss_deleg_creds)
976 self._preferred_keys = [hostkey.get_name()]
977
--> 978 self.start_client()
979
980 # check host key if we were given one
C:\Python27\lib\site-packages\paramiko-1.15.2-py2.7.egg\paramiko\transport.pyc in start_client(self, event)
404 e = self.get_exception()
405 if e is not None:
--> 406 raise e
407 raise SSHException('Negotiation failed.')
408 if event.is_set():
NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead
我已经使用这行代码几个月了,但这个错误直到最近才出现。
即使现在我也可以使用 WINSCP 连接到端口。
感谢帮助