【发布时间】:2013-05-31 04:49:33
【问题描述】:
我正在使用 paramiko 与公钥/私钥交换建立 SFTP 连接。它们的密钥是 SSH2 RSA 密钥。当我尝试连接时,我收到错误 BadAuthenticationType: Bad authentication type (allowed_types=[''])。有谁知道这可能是什么原因造成的?
key = paramiko.RSAKey.from_private_key_file(key, password=passphrase)
transport = paramiko.Transport((host, port))
transport.start_client()
transport.auth_publickey(username, key)
sftp = paramiko.SFTPClient.from_transport(transport)
【问题讨论】:
标签: python sftp paramiko ssh-keys