Paramiko SSHClient.connect() problem

Skip Montanaro skip.montanaro at gmail.com
Tue Oct 27 10:52:33 EDT 2015


On Tue, Oct 27, 2015 at 8:23 AM, Skip Montanaro <skip.montanaro at gmail.com>
wrote:

> >>> ssh = paramiko.SSHClient()
> >>> conn = ssh.connect("firefly")
> SSHException Server 'firefly' not found in known_hosts
> [<stdin>|<module>|1] [paramiko/client.py|connect|288]
> [paramiko/client.py|missing_host_key|570]
>

I figured out that I needed to call

ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

I guess that has the side effect of actually reading my known_hosts file?

Skip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20151027/fdaffdd9/attachment.html>


More information about the Python-list mailing list