title: Confirm PuTTY host key prompt with pywinauto
body: <p>I'm trying to automate PuTTY interface with pywinauto everything works except the part where i need to press <kbd>y</kbd> to accept the host keys when the alert window pops up. I'm using the PuTTY interface because it connects to an interactive interface not just normal ssh.</p>
  
  <p>Here's my code. I'm wondering why when I send <kbd>y</kbd> or <kbd>Enter</kbd>, it doesn't have effect on the popup window:</p>
  
  <pre><code>def config_dp(hostname, cm_temp_ip, new_ip):
      first_connect(cm_temp_ip)
      app = Application ().Start (cmd_line=u'putty.exe admin@'+cm_temp_ip+' -pw BLAHBLAHJ')
      putty = app.PuTTY
      putty.type_keys("y")
      putty.wait('ready')
      time.sleep(3)
      putty.type_keys("2")
      putty.type_keys("{ENTER}")
      putty.type_keys("2")
      putty.type_keys("{ENTER}")
      putty.type_keys(hostname)
      putty.type_keys("{ENTER}")
      putty.type_keys("{ENTER}")
      time.sleep(3)
      putty.type_keys("U")
      putty.type_keys("3")
      putty.type_keys("{ENTER}")
      putty.type_keys("{ENTER}")
      putty.type_keys("2")
      putty.type_keys("{ENTER}")
      putty.type_keys(new_ip+"/24")
      putty.type_keys("{ENTER}")
      time.sleep(5)
      putty.close()
      first_connect(new_ip)
      reboot(new_ip)
      time.sleep(60)
      enable_root(new_ip)
  </code></pre>