I know with the Paramiko SSHClient class, you can set the laid-back policy of missing hosts like this:
ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
However, I open the file stream through SFTP (not SSHClient), for example:
t = paramiko.Transport((process['hostname'], 22)) keyfile = paramiko.DSSKey.from_private_key_file('./id_dsa') t.connect(username = 'user', pkey = keyfile) sftp = paramiko.SFTPClient.from_transport(t)
I could not find anything in the docs for setting the missing host key policy through Transport or SFTPClient.
Is there a way to get the same using SFTPClient?
Cheers, Victor
source share