final SshKeyPair pair = SshKeyPairFactory.newInstance(keyType);
System.out.println("Generating " + String.valueOf(bits) + " bit " +
keyType + " key pair");
Thread thread = new SshThread(new Runnable() {
public void run() {
pair.generate(SshKeyGenerator.this.bits);
}
}, "Key generator", true);
thread.start();
while (thread.isAlive()) {
System.out.print(".");
try {
Thread.sleep(100);
} catch (InterruptedException e) {