key_filename=None, log=None, look_for_keys=False,
allow_agent=False):
self.client = paramiko.SSHClient()
- self.client.load_system_host_keys()
- self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ self.client.set_missing_host_key_policy(paramiko.WarningPolicy())
self.client.connect(ip, username=username, password=password,
pkey=pkey, key_filename=key_filename,
look_for_keys=look_for_keys,
output.append(line.decode('utf-8'))
if ret:
if self.log:
- self.log.info("*** FAILED to run command %s (%s)" % (command, ret))
+ self.log.info("*** FAILED to run command %s (%s)"
+ % (command, ret))
raise Exception(
"Unable to run \ncommand: %s\nret: %s"
% (command, ret))