Win32: The server's host key is not cached in the registry

Created by Martin Pool
Keywords:
win32 ssh putty

When connecting to an ssh or sftp server from bzr on Windows I get this message:

This error occurs because the SSH client has not connected to the server before and doesn't know it's identity. Bug 237297 in bzr asks that we handle this more gracefully, but the actual behaviour is coming from putty.

The easiest workaround for this is to run plink.exe to connect to the server once manually, at which point you'll be able to confirm and accept the SSH key.

If you know the host key there may be an interface in putty to directly add it to the cache. I couldn't find one in the manual.

See also: http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter2.html
http://www.walkernews.net/2008/07/21/where-does-putty-keeps-ssh-host-key-fingerprint-in-windows-registry/