python ssh 连接

 
 
  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

你可能感兴趣的:(server,python,ssh,command,System)