title: Putty won't cache the keys to access a server when run script in hudson
body: <p>I had a simple automation process to write which needed to copy a few files from linux server to windows via SSH. This can be accomplished using putty.</p>
  
  <p>SSH, as part of the protocol, verifies the host’s identity and if not known to be correct, will prompt you to accept the host’s identity. When I manually  connect the linux server with putty , it won’t prompt any information to accept the host’s identity. But once I put this automation process into Hudson as schedule job. The exact message was:</p>
  
  <blockquote>
    <p>The server's host key is not cached in the registry. You have no
    guarantee that the server is the computer you think it is. The
    server's rsa2 key fingerprint is: ssh-rsa 1024
    cc:78:13:a3:68:a6:59:7e:b8:23:2d:13:3e:66:9b:b9 If you trust this
    host, enter "y" to add the key to PuTTY's cache and carry on
    connecting. If you want to carry on connecting just once, without
    adding the key to the cache, enter "n". If you do not trust this host,
    press Return to abandon the connection. Store key in cache? (y/n)
    Connection abandoned.</p>
  </blockquote>
  
  <p>Usually you would hit “Y” here, assuming the host key is correct, in order to store it in future connection. The storage of this goes into the Registry under HKEY_CURRENT_USER\Software\SimonTatham\Putty\SshHostKeys</p>
  
  <p>But unfortunately ,  the automation process running in Hudson cannot do interaction by hit “Y” to store host key in putty cache. And also I cannot reproduce the issue by simply run the automation process under dos command.</p>
  
  <p>Does anyone know how to resolve the problem?</p>