Patch Set 3:

I think this is a better strategy, as it was extensible into the JSch case where we also have to ask about unknown or changed host keys, and passphrases for private keys.

It is a bit ugly to implement.  Be sure to check the final patch in the series (http://egit.eclipse.org/r/1881) to see an example of the new provider implementation for AWT and Java 6's system console.