0
我必須使用pysftp庫連接到其他服務器的python,目標服務器有一個關鍵值對文件(pem文件),而且我有但以下情況除外:pysftp連接到pem文件引發異常的主機paramiko.ssh_exception.BadAuthenticationType
paramiko.ssh_exception.BadAuthenticationType: ('Bad authentication type', [u'publickey']) (allowed_types=[u'publickey'])
我的代碼:
import pysftp
pysftp.Connection(host="<IP address>", username="myUserName", password="no password", port=22, private_key="myPemFilePath.pem")
請任何幫助嗎?我該如何解決這個問題?