【发布时间】:2019-07-03 21:18:34
【问题描述】:
我正在尝试使用以下spinet连接到服务器
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ip = ['x.x.x.x']
key_file = "/Users/user/.ssh/id_rsa"
key = paramiko.RSAKey.from_private_key_file(key_file)
ssh.load_system_host_keys()
ssh.connect(ips, port=22, username='XYZ', pkey=key, timeout=11)
但我收到一个错误:
不是有效的 RSA 私钥文件
【问题讨论】: