Exceptions — Paramiko documentation
docs.paramiko.org › en › stableexception paramiko.ssh_exception.BadHostKeyException (hostname, got_key, expected_key) ¶ The host key given by the SSH server did not match what we were expecting. Parameters: hostname ( str) – the hostname of the SSH server got_key ( PKey) – the host key presented by the server expected_key ( PKey) – the host key expected New in version 1.6.