python ssh 连接

来源:互联网 发布:滨州广电网络客服电话 编辑:程序博客网 时间:2024/04/30 10:57
 
 
  client = SSHClient()   client.load_system_host_keys()   client.connect('ssh.example.com')   stdin, stdout, stderr = client.exec_command('ls -l')

SSHException: Unknown server xxxx

 

需要:client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

https://github.com/paramiko/paramiko/issues/46